In a rails4 application, I am trying to send emails by configuring smtp settings but I am getting the following error:
553 5.7.1 : Sender address rejected: not owned by user
admin@mydomain.com
I am using the following settings:
config.action_mailer.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "smtp.mydomain.com",
:port => 25,
:domain => "mydomain.com",
:user_name => "admin@mydomain.com",
:password => "CorrectPassword",
:authentication => :plain,
:enable_starttls_auto => true,
:openssl_verify_mode => 'none'
}
config.action_mailer.default_url_options = {:host => "mydomain.com"}
The same works when I use my gmail account settings. I got my domain from bigrock.com and all MX Records are verified. I am able to send emails manually (by logging in webmail.mydomain.com). This issue has delayed the release of my site by quite a few days. Please Help!