iachat/app/mailers
Sojan Jose ad1539c6cf
fix(email): Allow inbox OAuth replies without global SMTP (#13820)
Email inbox replies now work for Google and Microsoft OAuth inboxes even
when the self-hosted instance does not have global SMTP configured. This
keeps agent replies working for email channels that already have valid
inbox-level delivery settings.

fixes: chatwoot/chatwoot#13118
closes: chatwoot/chatwoot#13118

## Why
Self-hosted email inbox replies were blocked by a global SMTP guard in
the `email_reply` path. For OAuth-backed email inboxes, outbound
delivery is configured at the inbox level, so the mailer returned early
and the reply flow failed before sending.

## What this change does
- Allows the `email_reply` path to proceed when the inbox has SMTP
configured
- Allows the `email_reply` path to proceed when the inbox has Google or
Microsoft OAuth delivery configured
- Renames the touched mailer helper predicates to `?` methods for
clarity

## Validation
- Configure a Google email inbox on a self-hosted instance without
global `SMTP_ADDRESS`
- Reply from Chatwoot to an existing email conversation
- Confirm the reply is sent through the inbox OAuth SMTP configuration
- Run `bundle exec rspec
spec/mailers/conversation_reply_mailer_spec.rb:595`

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2026-03-17 11:10:42 +04:00
..
administrator_notifications feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
agent_notifications feat: sanitize inbox name (#11597) 2025-06-09 14:46:12 +05:30
team_notifications feat: Add send message, fix issues with message conditions (#4423) 2022-04-14 13:36:55 +05:30
application_mailer.rb chore: log emails sent from chatwoot (#8721) 2024-01-17 13:19:14 +04:00
conversation_reply_mailer_attachment_helper.rb fix: stream attachment handling in workers (#12870) 2025-12-05 13:02:53 -08:00
conversation_reply_mailer_helper.rb fix(email): Allow inbox OAuth replies without global SMTP (#13820) 2026-03-17 11:10:42 +04:00
conversation_reply_mailer.rb fix(email): Allow inbox OAuth replies without global SMTP (#13820) 2026-03-17 11:10:42 +04:00
portal_instructions_mailer.rb fix: footer in ssl_instructions email (#12076) 2025-07-31 11:44:17 -07:00
references_header_builder.rb feat: add references header to reply emails (#11719) 2025-07-29 15:54:14 +05:30