Hey, I''m using ActionMailer to send emails, but the recipient never receives them. Here''s the method in my Notifier class: def order_placed(order) recipients order.user.email from "orders-6nQb3yZKdZrelmxzKc6BS1aTQe2KTcn/@public.gmane.org" subject "Your Soundcast Systems Order" body :order => order end And here''s a snip from the log (development): ...snip... Address Load (0.002011) SELECT * FROM `addresses` WHERE (`addresses`.addressable_id = 5 AND `addresses`.addressable_type ''Order'' AND (addresses.which = ''shipping'')) LIMIT 1 Payment Load (0.001367) SELECT * FROM `payments` WHERE (`payments`.order_id = 5) LIMIT 1 Payment Columns (0.003850) SHOW FIELDS FROM `payments` User Load (0.000760) SELECT * FROM `users` WHERE (`users`.`id` 1) Sent mail to gregx999-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org From: orders-6nQb3yZKdZrelmxzKc6BS1aTQe2KTcn/@public.gmane.org To: gregx999-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Subject: Your Soundcast Systems Order Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Hi Greg Burger, you placed an order. This is a test. SQL (0.000518) BEGIN SQL (0.000189) COMMIT ...snip... From that snip of the log, it certainly seems as if the email is being sent. I tried to have it sent to a few different addresses, and none of them ever actually get the email. (I looked in my Junk folders too.) I saw in a previous thread someone was having a similar problem, but they just had an empty "to" field. Any ideas? Thanks, Greg --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Jun-16 16:21 UTC
Re: ActionMailer sending mail, but never received...
On 16 Jun 2008, at 17:18, Greg B. wrote:> > Hey, I''m using ActionMailer to send emails, but the recipient never > receives them. >Is actionmailer set to use the correct smtp/sendmail/ etc... ? Fred> Here''s the method in my Notifier class: > > def order_placed(order) > recipients order.user.email > from "orders-6nQb3yZKdZrelmxzKc6BS1aTQe2KTcn/@public.gmane.org" > subject "Your Soundcast Systems Order" > body :order => order > end > > And here''s a snip from the log (development): > > ...snip... > Address Load (0.002011) SELECT * FROM `addresses` WHERE > (`addresses`.addressable_id = 5 AND `addresses`.addressable_type > ''Order'' AND (addresses.which = ''shipping'')) LIMIT 1 > Payment Load (0.001367) SELECT * FROM `payments` WHERE > (`payments`.order_id = 5) LIMIT 1 > Payment Columns (0.003850) SHOW FIELDS FROM `payments` > User Load (0.000760) SELECT * FROM `users` WHERE (`users`.`id` > 1) > Sent mail to gregx999-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > From: orders-6nQb3yZKdZrelmxzKc6BS1aTQe2KTcn/@public.gmane.org > To: gregx999-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > Subject: Your Soundcast Systems Order > Mime-Version: 1.0 > Content-Type: text/plain; charset=utf-8 > > Hi Greg Burger, you placed an order. > > This is a test. > SQL (0.000518) BEGIN > SQL (0.000189) COMMIT > ...snip... > > From that snip of the log, it certainly seems as if the email is being > sent. I tried to have it sent to a few > different addresses, and none of them ever actually get the email. (I > looked in my Junk folders too.) > > I saw in a previous thread someone was having a similar problem, but > they just had an empty "to" field. > > Any ideas? > > Thanks, > Greg > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thorsten Müller
2008-Jun-16 16:25 UTC
Re: ActionMailer sending mail, but never received...
another option is that delivery_method for actionmailer is set to test in config/environments/development.rb. config.action_mailer.delivery_method = :test In that case you would still get your mail content in the log file, but nothing is delivered. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I set it. I assume the settings are correct as there are no errors in the log. Would it insert an error in the log or give me an error page if it couldn''t login to the server to send the mail? Greg On Jun 16, 12:21 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 16 Jun 2008, at 17:18, Greg B. wrote: > > > > > Hey, I''m using ActionMailer to send emails, but the recipient never > > receives them. > > Is actionmailer set to use the correct smtp/sendmail/ etc... ? > > Fred > > > Here''s the method in my Notifier class: > > > def order_placed(order) > > recipients order.user.email > > from "ord...-6nQb3yZKdZrelmxzKc6BS1aTQe2KTcn/@public.gmane.org" > > subject "Your Soundcast Systems Order" > > body :order => order > > end > > > And here''s a snip from the log (development): > > > ...snip... > > Address Load (0.002011) SELECT * FROM `addresses` WHERE > > (`addresses`.addressable_id = 5 AND `addresses`.addressable_type > > ''Order'' AND (addresses.which = ''shipping'')) LIMIT 1 > > Payment Load (0.001367) SELECT * FROM `payments` WHERE > > (`payments`.order_id = 5) LIMIT 1 > > Payment Columns (0.003850) SHOW FIELDS FROM `payments` > > User Load (0.000760) SELECT * FROM `users` WHERE (`users`.`id` > > 1) > > Sent mail to gregx...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > From: ord...-6nQb3yZKdZrelmxzKc6BS1aTQe2KTcn/@public.gmane.org > > To: gregx...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > Subject: Your Soundcast Systems Order > > Mime-Version: 1.0 > > Content-Type: text/plain; charset=utf-8 > > > Hi Greg Burger, you placed an order. > > > This is a test. > > SQL (0.000518) BEGIN > > SQL (0.000189) COMMIT > > ...snip... > > > From that snip of the log, it certainly seems as if the email is being > > sent. I tried to have it sent to a few > > different addresses, and none of them ever actually get the email. (I > > looked in my Junk folders too.) > > > I saw in a previous thread someone was having a similar problem, but > > they just had an empty "to" field. > > > Any ideas? > > > Thanks, > > Greg--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ah!! Figured it out... My "from" email has to be an existing email account otherwise the mail server was rejecting the address. When I looked for: config.action_mailer.delivery_method = :test I saw: config.action_mailer.raise_delivery_errors = false So I set it to true and this time it threw an error. Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Jun-16 16:34 UTC
Re: ActionMailer sending mail, but never received...
On 16 Jun 2008, at 17:27, Greg B. wrote:> > I set it. I assume the settings are correct as there are no errors in > the log. Would it insert an error in the log or give me an error page > if it couldn''t login to the server to send the mail? >Depends on the delivery method. For example if you set it to sendmail and sendmail accepts the item you won''t get an error message, even if sendmail then later on drops it on the floor. Fred> Greg > > On Jun 16, 12:21 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On 16 Jun 2008, at 17:18, Greg B. wrote: >> >> >> >>> Hey, I''m using ActionMailer to send emails, but the recipient never >>> receives them. >> >> Is actionmailer set to use the correct smtp/sendmail/ etc... ? >> >> Fred >> >>> Here''s the method in my Notifier class: >> >>> def order_placed(order) >>> recipients order.user.email >>> from "ord...-6nQb3yZKdZrelmxzKc6BS1aTQe2KTcn/@public.gmane.org" >>> subject "Your Soundcast Systems Order" >>> body :order => order >>> end >> >>> And here''s a snip from the log (development): >> >>> ...snip... >>> Address Load (0.002011) SELECT * FROM `addresses` WHERE >>> (`addresses`.addressable_id = 5 AND `addresses`.addressable_type >>> ''Order'' AND (addresses.which = ''shipping'')) LIMIT 1 >>> Payment Load (0.001367) SELECT * FROM `payments` WHERE >>> (`payments`.order_id = 5) LIMIT 1 >>> Payment Columns (0.003850) SHOW FIELDS FROM `payments` >>> User Load (0.000760) SELECT * FROM `users` WHERE (`users`.`id` >>> 1) >>> Sent mail to gregx...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> >>> From: ord...-6nQb3yZKdZrelmxzKc6BS1aTQe2KTcn/@public.gmane.org >>> To: gregx...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >>> Subject: Your Soundcast Systems Order >>> Mime-Version: 1.0 >>> Content-Type: text/plain; charset=utf-8 >> >>> Hi Greg Burger, you placed an order. >> >>> This is a test. >>> SQL (0.000518) BEGIN >>> SQL (0.000189) COMMIT >>> ...snip... >> >>> From that snip of the log, it certainly seems as if the email is >>> being >>> sent. I tried to have it sent to a few >>> different addresses, and none of them ever actually get the email. >>> (I >>> looked in my Junk folders too.) >> >>> I saw in a previous thread someone was having a similar problem, but >>> they just had an empty "to" field. >> >>> Any ideas? >> >>> Thanks, >>> Greg > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---