email - SMTP settings for Office 365 in Rails application -


I have an office 365 with Godaddy, I'm trying to set up SMTP settings for my rail app :

  config.action_mailer.delivery_method =: smtp config.action_mailer.smtp_settings = {: address = & gt; "Smtp.office365.com" ,: port = & gt; 587 ,: user_name = & gt; ENV ["OFFICE_USERNAME"] ,: Password = & gt; ENV ["OFFICE_PASSWORD"] ,: Authentication = & gt; 'Login',: domain = & gt; 'Example.com' ,: enable_starttls_auto = & gt; True}  

But when I try to submit a message from my contact page to those settings, I get this error message:

550 5.7.1 The client does not have permission to send this sender.

How did the SMTP setting for the Office 365 account be set in Rail Application?

I found the answer to this question here:

Relevant parts:

  config.action_mailer.delivery_method =: Smtp config.action_mailer.smtp_settings = {: address = & gt; 'Smtp.office365.com',: port = & gt; '587',: Authentication = & gt; : Login,: user_name = & gt; ENV ['SMTP_USERNAME'],: Password = & gt; ENV ['SMTP_PASSWORD'],: domain = & gt; 'Congrueit.com' ,: enable_starttls_auto = & gt;  

Then:

Be sure that: matches email address, domain, and user / pass.

My job is not to copy and paste related information that works for me.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -