ActionMailer Don't Say Nuttin'

Yet another variant on the ActionMailer problems.

I have no errors, and no emails.

The log file & server chatter say that the email is sent--including
the To: header.
These outputs are immune to
ActionMailer::Base.delivery_method = :sendmail or :smtp
ActionMailer::Base.perform_deliveries = true or false
ActionMailer::Base.raise_delivery_errors = true or false

I'm setting these at the end of environment.rb. I've read a couple
dozen threads here hoping for a new idea.

Processing MainController#index (for 127.0.0.1 at 2008-05-19 23:47:52)
[POST]
  Session ID:
BAh7BzoMY3NyZl9pZCIlYmViMTljZmNmNDk4YWExYTk4MjMwNTA4OWI3MGZm
%0ANWIiCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhh
%0Ac2h7AAY6CkB1c2VkewA%3D--e3d44dc1cb428c9dd909b61f5d8a766924ea25c9
  Parameters: {"commit"=>"commit",
"authenticity_token"=>"dc3c8255a1b199d167d8c76c2642327fe7481444",
"action"=>"index", "controller"=>"main",
"main"=>{"imap_username"=>"ggdaf", "imap_server"=>"ddef",
"port"=>"1234", "imap_password"=>"asdf", "use_ssl"=>"1",
"email_address"=>"valid@realdomain.net"}}
Sent mail:

I know raise_delivery_errors is set in config/environments/development.rb, so perhaps try changing the value in that file instead of firstly defining it in config/environment.rb

I had not noticed that. Unfortunately, none of the variants suggested
by this line of observation are helping. Logger output is unchanged.
Still no mail delivered.

I did some log diving, and I found this in /var/log/exim4/mainlog:
2008-05-20 00:44:18 1JyKe2-0005Jp-UG **valid@realdomain.net
<valid@realdomain.net> R=nonlocal: Mailing to remote domains not
supported
2008-05-20 00:44:18 1JyKe2-0005Jp-UG Frozen (delivery error message)

(exim4 is an Ubuntu sendmail replacement)

What is interesting is that this is happening even which I configure
to use smtp!
???

Yep. (And I did it one more time, just for you!) :wink:

Then I don’t have a clue, sorry! Best of luck.

I had not noticed that. Unfortunately, none of the variants suggested
by this line of observation are helping. Logger output is unchanged.
Still no mail delivered.

I did some log diving, and I found this in /var/log/exim4/mainlog:
2008-05-20 00:44:18 1JyKe2-0005Jp-UG **valid@realdomain.net
<valid@realdomain.net> R=nonlocal: Mailing to remote domains not
supported
2008-05-20 00:44:18 1JyKe2-0005Jp-UG Frozen (delivery error message)

(exim4 is an Ubuntu sendmail replacement)

What is interesting is that this is happening even which I configure
to use smtp!

Have you changed your smtp settings ? by default rails will just
connect to localhost (ie your instance of exim)
Either sort out your exim settings or change the smtp settings to
point to a server that will let you send mail.
Fred

I did some log diving, and I found this in /var/log/exim4/mainlog:
2008-05-20 00:44:18 1JyKe2-0005Jp-UG **va...@realdomain.net
<va...@realdomain.net> R=nonlocal: Mailing to remote domains not
supported
2008-05-20 00:44:18 1JyKe2-0005Jp-UG Frozen (delivery error message)

(exim4 is an Ubuntu sendmail replacement)

What is interesting is that this is happening even which I configure
to use smtp!
???

I agree with Fred. The log info that you're showing here suggests the
problem lies outside the framework. Rails is doing its job by handing
off the mail to exim and the exim config appears to be holding onto it
from there.

Morning light can do funny things. I was doing smtp_settings= in the
child class, not ActionMailer::Base.
Now I'm getting an smtp authentication error--I expect a typo.

And, with http://www.wanlord.com/articles/2007/11/29/sending-email-using-actionmailer-and-gmail,
I'm up! (Once I added the :tsl => true line)

Student wrote:

Morning light can do funny things. I was doing smtp_settings= in the
child class, not ActionMailer::Base.
Now I'm getting an smtp authentication error--I expect a typo.

Another problem, just in case someone else comes across this thead,
(like i did), is when you use :smtp, you must specify a :domain inthe
settings, even if you don't use authentication. I had this problem.
(Among others)

<code>
ActionMailer::Base.smtp_settings = {
  :address => "localhost",
  :port => 25,
  :domain => 'yourdomainhere.com'
  }

</code>

Cheers!

-Anthony Altemara
http://AltemaraIT.com