iachat/app/builders
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
..
campaigns fix: correct typo in CampaignConversationBuilder (#11336) 2025-04-21 11:57:38 +05:30
csat_surveys feat: Add CSAT response APIs (#2503) 2021-06-29 20:59:41 +05:30
email fix: validate support_email format and handle parse errors in mailer (#13958) 2026-04-13 19:06:06 +07:00
messages fix: Handle Facebook reel attachment type (#13691) 2026-03-06 08:49:41 +04:00
v2 feat: Add standalone outgoing messages count API endpoint (#13419) 2026-02-04 19:36:50 +05:30
account_builder.rb fix: account email validation during signup (#11307) 2025-05-20 20:45:39 -07:00
agent_builder.rb feat: setup invite to handle SAML enabled account [CW-5613] (#12439) 2025-09-17 19:33:38 +05:30
contact_inbox_builder.rb feat: outbound voice call essentials (#12782) 2025-11-24 17:47:00 -08:00
contact_inbox_with_contact_builder.rb feat: Instagram Inbox using Instagram Business Login (#11054) 2025-04-08 10:47:41 +05:30
conversation_builder.rb feat: Ability to lock to single conversation (#5881) 2022-11-25 13:01:04 +03:00
notification_builder.rb fix: Exclude notifications for blocked contacts, except mentions (#10659) 2025-01-12 15:30:27 +05:30
notification_subscription_builder.rb chore: Use "create!" and "save!" bang methods when not checking the result (#5358) 2022-09-13 17:40:06 +05:30
year_in_review_builder.rb feat(ce): Add Year in review feature (#13078) 2025-12-15 17:24:45 -08:00