One week - same problem - no idea :S

Hey guys - I've been struggling for over a week to get my action
mailer working - I've built a second application and I get the same
I'm pretty sure the problem must be with my smtp settings - according
to everything I've read, these are correct though, is there anyone out
there who can help?

In my environment.rb I have:

ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
  :address => "",
  :port => "465",
  :domain => "",
  :authentication => :login,
  :user_name => "", # is this the email address from
which I'm sending mail?
  :password => "password"

This gives:
Timeout::Error (execution expired)

Other combinations of smtp settings give me either:
SocketError: getaddrinfo: Name or service not known
OpenSSL::SSL::SSLError: hostname was not match with the server

What am I doing wrong?

  :user_name => "", # is this the email address from
which I'm sending mail?

It's the login for that email account (generally the email address you
are sending from)

Possibly its because its a tls (secure) connection (usually you'd
connect to port 25) - you may need a rails plugin to get it to work:


Thanks for that Luke

I gave it a go with my host's smtp settings - no luck! I still get the
Timeout::Error: execution expired

But when I tried with my gmail account settings it does work

I'm guessing the settings I've stated are wrong. Any ideas what they
should be set to?

My host specifes:
Incoming Mail Server:
Incoming Mail Server: (SSL)
Outgoing Mail Server: (server requires
authentication) port 25
Outgoing Mail Server: (SSL) (server requires
authentication) port 465
Supported Incoming Mail Protocols: POP3, POP3S (SSL/TLS), IMAP, IMAPS
Supported Outgoing Mail Protocols: SMTP, SMTPS (SSL/TLS)

Should I set the domain to localhost?

Luke - I swear to god I've been trying those settings all week to no
I can only assume the plugin you recommended is what helped.

Anyways - I really appreciate your help mate, mailer is working great