The typical configuration in such a case is (using an smtp server that doesn't require SSL fro authentication) :
config.action_mailer.smtp_settings = {
:address => 'smtp.mailserver.com',
:port => 123,
:domain => "your domain name",
:authentication => :login,
:user_name => "account@mailserver.com",
:password => "account_password"
}
Or maybe you could use an smtp server that doesn't require authentication at all, disregarding that it will be considered as spam by
default by most respectful email providers:
config.action_mailer.smtp_settings = {
:address => 'smtp.mailserver.com',
:port => 123,
:domain => "your domain name",
:authentication => :plain
}
That's it for the problem. We need to use the great ActionMailer, with a respectful smtp server that requires SSL at the same time. The solution is the magical plugin action_mailer_tls. You just download and install the plugin, and add one line to the smtp settings:
config.action_mailer.smtp_settings = {
:address => 'smtp.mailserver.com',
:port => 123,
:domain => "your domain name",
:authentication => :login,
:user_name => "account@mailserver.com",
:password => "account_password",
:tls => true
}That's it. Now you can generate mails and use that smtp server with TLS to forward your emails. Pretty handy, right?

4 comments:
Haitham, good research.
However, it seems that this plugin has now been obsoleted, I don't know why, but it always gives 404 not found when searching for its source!
I tried another patch and it worked for me!
Thanks a lot. Worked liked a charm surprisingly!
Still great help
Hi, i will like to know if you could help me ??? I can send emails by gmail account, however i will like to do it by my smtp server
Post a Comment