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
problems.
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 => "server.600host.net",
  :port => "465",
  :domain => "mydomain.com",
  :authentication => :login,
  :user_name => "user@mydomain.com", # 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
or
OpenSSL::SSL::SSLError: hostname was not match with the server

What am I doing wrong?

  :user_name => "user@mydomain.com", # 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:

http://agilewebdevelopment.com/plugins/actionmailer_tls

Cheers
Luke

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: mail.thinkersplayground.com
Incoming Mail Server: (SSL) server.600host.net
Outgoing Mail Server: mail.thinkersplayground.com (server requires
authentication) port 25
Outgoing Mail Server: (SSL) server.600host.net (server requires
authentication) port 465
Supported Incoming Mail Protocols: POP3, POP3S (SSL/TLS), IMAP, IMAPS
(SSL/TLS)
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
avail.
I can only assume the plugin you recommended is what helped.

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

:slight_smile:

Thanks