Hi,
I have several rails applications on a shared hosting.
To avoid the server’s restriction of sending mails, I use an external
SMTP.
It works most of times but for some sender emails it gives an error.
Net::SMTPFatalError (554 5.7.1 [email protected]: Relay access
denied
The error happens if sender’s domain is gmail.com, yahoo.com or
hotmail.com.
But it works most other domains.
How do I avoid this error?
The smtp configuration is like the following.
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:tls => true,
:address => “smtpdomain.com”,
:port => 587,
:domain => “www.mydomain.com”,
:user_name => “my_user_name”,
:password => “my_pasword”,
:authentication => :plain
}
Thanks.
Sam