iachat/spec/models
Tanmay Deep Sharma 722e68eecb
fix: validate support_email format and handle parse errors in mailer (#13958)
## Description

ConversationReplyMailer#parse_email calls
Mail::Address.new(email_string).address without error handling. When an
account's support_email contains a non-email string (e.g., "Smith
Smith"), the mail gem raises Mail::Field::IncompleteParseError, crashing
conversation transcript emails.

This has caused 1,056 errors on Sentry (EXTERNAL-CHATINC-JX) since Feb
25, all from a single account that has a name stored in the
support_email field instead of a valid email address.

Closes
https://linear.app/chatwoot/issue/CW-6687/mailfieldincompleteparseerror-mailaddresslist-can-not-parse-orsmith

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)


## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com>
2026-04-13 19:06:06 +07:00
..
channel fix: call authorization_error! on IMAP auth failures (#13560) (revert) (#13671) 2026-02-26 18:45:18 -08:00
concerns fix: Skip email rate limiting for self-hosted instances (#13915) 2026-03-26 18:06:10 +05:30
enterprise/audit
integrations
.keep
account_spec.rb
account_user_spec.rb
agent_bot_inbox_spec.rb
agent_bot_spec.rb
application_record_external_credentials_encryption_spec.rb
article_spec.rb
assignment_policy_spec.rb
attachment_spec.rb
automation_rule_spec.rb
campaign_spec.rb
category_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
contact_inbox_spec.rb
contact_spec.rb
conversation_participants_spec.rb
conversation_spec.rb fix: bot handoff should set waiting time (#13417) 2026-02-27 15:31:49 +05:30
csat_survey_response_spec.rb
custom_attribute_definition_spec.rb
data_import_spec.rb
folder_spec.rb
inbox_member_spec.rb
inbox_spec.rb
installation_config_spec.rb
label_spec.rb
macro_spec.rb
mention_spec.rb
message_spec.rb
note_spec.rb
notification_setting_spec.rb
notification_spec.rb
platform_app_permissible_spec.rb feat: Add Platform APIs (#1456) 2021-01-14 20:35:22 +05:30
platform_app_spec.rb
portal_spec.rb feat: Add draft status for help center locales (#13768) 2026-03-17 12:45:54 +04:00
related_category_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
reporting_event_spec.rb
reporting_events_rollup_spec.rb
team_member_spec.rb
team_spec.rb feat: invalidate cache after inbox members or team members update (#10869) 2025-02-20 21:28:38 -08:00
user_spec.rb
webhook_spec.rb
working_hour_spec.rb fix: Update timezone to get wday from working_hours (#5605) 2022-10-12 14:32:54 -07:00