I am using the ar_mailer gem. I have been able to get emails into my
newly created emails table, but when I run ar_sendmail to actually
send the messages from the table, absolutely nothing happens. I run
“ar_sendmail” from my app’s root directory, and it hangs for a few
seconds, like it is processing something, then the prompt comes back
as it has finished. But all the emails are still queued up in the
emails table. Nothing was actually sent, and there are no errors
thrown. I tried running ar_sendmail with some options, such
as …ar_sendmail -d --batch-size 4 --delay 60 --environment
production, but that produced the same result.
My environment.rb file has the correct require: require
‘action_mailer/ar_mailer’
Has anyone else experienced this? Am I missing something else? Is
there a way I can see some debug from ar_sendmail to find out what is
going on in those few seconds that it seems to be doing something?
I can see where the email template is used in the production.log file,
and those emails are being added to the emails table properly. When I
do a “ar_sendmail”, to actually send the messages, I get absolutely no
output to the production.log, like it is not even hitting it.
Thanks for the quick replies! There is no output to the
development.log either. The interesting thing is, if I do a
“ar_sendmail --mailq”, it prints out the 3 entries I have in the
emails table. So it is connecting to the right table and reading the
data from it. I tried a “ar_sendmail -v” to get the verbose output,
and it says “found 3 messages to send” and then just quits.
Maybe this is a silly question to ask, has your smtp ever performed
successfully in the past?
If not, perhaps check to make sure the smtp traffic is not blocked. I
had this experience where my rails smtp traffic was quietly blocked by
the corporate firewall and I just couldn’t figure out why the mail
wasn’t going out. I had no error message in my log as well. I
eventually found out about the firewall block.
Hmmm … a good thought, but when I look at the emails table, the
column for “last_send_attempt” is 0 for all my entries. So wouldn’t
that get incremented if it was actually sending the email, but getting
blocked down the line? It seems like it is not even trying to send
the messages, because the last_send_attempt is never changed.
Thanks for any help!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.