Files
netlas c1c05429a8
Some checks failed
Lock Threads / action (push) Has been cancelled
fix(microsoft-shared): make email_oauth_enabled? return true for microsoft_shared
ConversationReplyMailer#email_reply guards delivery with:

  return unless smtp_config_set_or_development? || email_smtp_enabled?
                || (email_imap_enabled? && email_oauth_enabled?)

email_oauth_enabled? in the upstream helper only recognises microsoft? and
google? providers. For our new microsoft_shared provider it returns false,
so the guard fails:
  - smtp_config_set_or_development?  false (production, no SMTP_ADDRESS)
  - email_smtp_enabled?              false (we never set channel.smtp_enabled)
  - email_imap_enabled?              true  (we set imap_enabled in callback)
  - email_oauth_enabled?             false (channel.microsoft? is false)

email_reply early-returns without calling mail(). ActionMailer ends up
with no Mail::Message, deliver_now returns nil, and the next line in
Email::SendOnEmailService raises 'undefined method message_id for nil'.

Override email_oauth_enabled? in the overlay to return true for
microsoft_shared channels.
2026-04-28 11:47:50 +03:00
..