Can't send mails through Office365

Added by Andrea Ligios 8 months ago

Hi,

I'm using a fresh Redmine 4.0.1 under a Bitnami stack (Debian 9, Rails 5.2.2, etc..).

I've configured the SMTP for Office365. The same settings work on another server (Gitlab), so everything is fine).

production:
  email_delivery:
    delivery_method: :smtp  
    smtp_settings:
      address: "smtp.office365.com" 
      port: 587
      domain: "smtp.office365.com" 
      authentication: :login
      user_name: "MY_USER@MY_DOMAIN.COM" 
      password: "MY_PASSWORD" 
      enable_starttls_auto: true

The error:

[ActiveJob] [ActionMailer::DeliveryJob] [1a733de9-2670-46b4-84b2-d511d9cb43b4] 
Error performing ActionMailer::DeliveryJob (Job ID: 1a733de9-2670-46b4-84b2-d511d9cb43b4) from Async(mailers) in 3183.29ms: 
Net::SMTPFatalError (554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; 
Failed to process message due to a permanent exception with message Cannot submit message. 
...
[Hostname=DB6PR0401MB2471.eurprd04.prod.outlook.com]):
...

What can it be?

I've read somewhere that Office365 recently (2017) disallowed the usage of a FROM user different from the logged one... how can I check and eventually change the default FROM user in Redmine?

Thanks in advance

Replies (2)

RE: Can't send mails through Office365 - Added by Andrea Ligios 7 months ago

Well, I've reimported the db, re-run the rake of the plugins:

ruby bin/rake redmine:plugins RAILS_ENV="production"

and this somehow fixed it.

Now the mails are being sent.

RE: Can't send mails through Office365 - Added by Andrea Ligios 7 months ago

UPDATE: I wasn't aware that the SENDER email (which I was trying to change in the configuration) has been changed in Redmine admin UI by the admin. Now it makes sense, and hence THIS is the solution.

(1-2/2)