I can't seem to be able to achieve this. I saw this asked before here, but I can't get it to work. I want to send mail from my dreamhost mail, set up like this:
require 'mail'
options = { :address => "smtp.dreamhost.com",
:port => 465,
:domain => 'mydomain.cl',
:user_name => 'me@mydomain.cl',
:password => 'pass',
:authentication => 'plain',
:enable_starttls_auto => true }
Mail.defaults do
delivery_method :smtp, options
end
Mail.deliver do
from 'me@mydomain.cl'
to 'mypersonalemail@gmail.com'
subject 'test'
body 'test'
add_file 'test.txt'
end
Apparently the authentication is working, but after several seconds all I get is the following error:
Net::ReadTimeout with #<TCPSocket:(closed)>
Does anybody have a clue on what may be going on?
Thank you.