First you’ll need to add your production box IP address to Exchange Connector
Example URL: https://outlook.office365.com/ecp/?rfr=Admin_o365&exsvurl=1&Realm=yourdomain.com
Then add the following to application production.rb
1 2 3 4 5 6 7 8 9 10 |
config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :smtp config.action_mailer.perform_deliveries = true config.action_mailer.smtp_settings = { :address => "yourdomain-com.mail.protection.outlook.com", :from => 'somesendername@yourdomain.com', :port => 25, :domain => "yourdomain.com", :enable_starttls_auto => true } |
and boom! your Rails app will start sending emails through Office 365.