LAB
2008-Jul-08 21:42 UTC
ar_sendmail is not sending email from the email table with ARMailer
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'' My production.rb file looks like: ActionMailer::Base.smtp_settings = { :address => "localhost", :port => 25, :domain => ''domain.com'' } ActionMailer::Base.perform_deliveries = true ActionMailer::Base.delivery_method = :activerecord ActionMailer::Base.raise_delivery_errors = false ActionMailer::Base.default_charset = "utf-8" ActionMailer::Base.default_content_type = "text/html" 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? Thanks in advance! LAB --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Richard Luther
2008-Jul-08 22:02 UTC
Re: ar_sendmail is not sending email from the email table with ARMailer
What does your production.log say? - Richard On Jul 8, 2:42 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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'' > > My production.rb file looks like: > ActionMailer::Base.smtp_settings = { > :address => "localhost", > :port => 25, > :domain => ''domain.com''} > > ActionMailer::Base.perform_deliveries = true > ActionMailer::Base.delivery_method = :activerecord > ActionMailer::Base.raise_delivery_errors = false > ActionMailer::Base.default_charset = "utf-8" > ActionMailer::Base.default_content_type = "text/html" > > 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? > > Thanks in advance! > LAB--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
LAB
2008-Jul-08 22:07 UTC
Re: ar_sendmail is not sending email from the email table with ARMailer
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. On Jul 8, 6:02 pm, Richard Luther <richard.lut...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What does your production.log say? > - Richard > > On Jul 8, 2:42 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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'' > > > My production.rb file looks like: > > ActionMailer::Base.smtp_settings = { > > :address => "localhost", > > :port => 25, > > :domain => ''domain.com''} > > > ActionMailer::Base.perform_deliveries = true > > ActionMailer::Base.delivery_method = :activerecord > > ActionMailer::Base.raise_delivery_errors = false > > ActionMailer::Base.default_charset = "utf-8" > > ActionMailer::Base.default_content_type = "text/html" > > > 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? > > > Thanks in advance! > > LAB--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Richard Luther
2008-Jul-08 22:30 UTC
Re: ar_sendmail is not sending email from the email table with ARMailer
Maybe the --environment arg isnt working properly, check the development log to see if its defaulting to that. On Jul 8, 3:07 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > On Jul 8, 6:02 pm, Richard Luther <richard.lut...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > What does your production.log say? > > - Richard > > > On Jul 8, 2:42 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > 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'' > > > > My production.rb file looks like: > > > ActionMailer::Base.smtp_settings = { > > > :address => "localhost", > > > :port => 25, > > > :domain => ''domain.com''} > > > > ActionMailer::Base.perform_deliveries = true > > > ActionMailer::Base.delivery_method = :activerecord > > > ActionMailer::Base.raise_delivery_errors = false > > > ActionMailer::Base.default_charset = "utf-8" > > > ActionMailer::Base.default_content_type = "text/html" > > > > 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? > > > > Thanks in advance! > > > LAB--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
LAB
2008-Jul-08 23:08 UTC
Re: ar_sendmail is not sending email from the email table with ARMailer
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. Any other ideas? On Jul 8, 6:30 pm, Richard Luther <richard.lut...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Maybe the --environment arg isnt working properly, check the > development log to see if its defaulting to that. > > On Jul 8, 3:07 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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. > > > On Jul 8, 6:02 pm, Richard Luther <richard.lut...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > What does your production.log say? > > > - Richard > > > > On Jul 8, 2:42 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > 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'' > > > > > My production.rb file looks like: > > > > ActionMailer::Base.smtp_settings = { > > > > :address => "localhost", > > > > :port => 25, > > > > :domain => ''domain.com''} > > > > > ActionMailer::Base.perform_deliveries = true > > > > ActionMailer::Base.delivery_method = :activerecord > > > > ActionMailer::Base.raise_delivery_errors = false > > > > ActionMailer::Base.default_charset = "utf-8" > > > > ActionMailer::Base.default_content_type = "text/html" > > > > > 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? > > > > > Thanks in advance! > > > > LAB--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
stevel
2008-Jul-08 23:21 UTC
Re: ar_sendmail is not sending email from the email table with ARMailer
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. Just a thought. On Jul 8, 4:08 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > Any other ideas? > > On Jul 8, 6:30 pm, Richard Luther <richard.lut...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Maybe the --environment arg isnt working properly, check the > > development log to see if its defaulting to that. > > > On Jul 8, 3:07 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > 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. > > > > On Jul 8, 6:02 pm, Richard Luther <richard.lut...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > What does your production.log say? > > > > - Richard > > > > > On Jul 8, 2:42 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > 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'' > > > > > > My production.rb file looks like: > > > > > ActionMailer::Base.smtp_settings = { > > > > > :address => "localhost", > > > > > :port => 25, > > > > > :domain => ''domain.com''} > > > > > > ActionMailer::Base.perform_deliveries = true > > > > > ActionMailer::Base.delivery_method = :activerecord > > > > > ActionMailer::Base.raise_delivery_errors = false > > > > > ActionMailer::Base.default_charset = "utf-8" > > > > > ActionMailer::Base.default_content_type = "text/html" > > > > > > 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? > > > > > > Thanks in advance! > > > > > LAB--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
LAB
2008-Jul-08 23:31 UTC
Re: ar_sendmail is not sending email from the email table with ARMailer
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! On Jul 8, 7:21 pm, stevel <isig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > Just a thought. > > On Jul 8, 4:08 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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. > > > Any other ideas? > > > On Jul 8, 6:30 pm, Richard Luther <richard.lut...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Maybe the --environment arg isnt working properly, check the > > > development log to see if its defaulting to that. > > > > On Jul 8, 3:07 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > 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. > > > > > On Jul 8, 6:02 pm, Richard Luther <richard.lut...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > What does your production.log say? > > > > > - Richard > > > > > > On Jul 8, 2:42 pm, LAB <LABus...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > 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'' > > > > > > > My production.rb file looks like: > > > > > > ActionMailer::Base.smtp_settings = { > > > > > > :address => "localhost", > > > > > > :port => 25, > > > > > > :domain => ''domain.com''} > > > > > > > ActionMailer::Base.perform_deliveries = true > > > > > > ActionMailer::Base.delivery_method = :activerecord > > > > > > ActionMailer::Base.raise_delivery_errors = false > > > > > > ActionMailer::Base.default_charset = "utf-8" > > > > > > ActionMailer::Base.default_content_type = "text/html" > > > > > > > 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? > > > > > > > Thanks in advance! > > > > > > LAB--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Misha Dragojevic
2008-Jul-10 21:25 UTC
Re: ar_sendmail is not sending email from the email table with ARMailer
Make sure you have SMTP server running on your box. ar_sendmail needs to deleiver email to SMTP server of some sort. To test try telnet localhost 25 on Mac you would start SMTP server as "sudo postfix start", on Ubuntu: "sudo /etc/init.d/postfix start" Once your SMTP server is running you will be able to tail the logs and fix the problem: tail -f /var/log/mail.log -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---