Hi, Can someone explain the proper use of the use of perform_deliveries in the environment.rb file?? ActionMailer::Base.perform_deliveries = false I just moved a new controller to the production version of an app, but wanted to be sure everything was properly configured before sending out a big mailing, so I set perform_deliveries = false, believing that would prevent mail from being sent. Big surprise when my entire mailing list got a copy of the email I was testing. Is there something ELSE I need to do to keep mail from being sent? Thanks, Denise -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060628/75ac90a1/attachment.html
Try ActionMailer::Base.delivery_method = :test>From the RoR manual:However it is worth describing what each statement does ActionMailer::Base.delivery_method = :test sets the delivery method to test mode so that email will not actually be delivered (useful to avoid spamming your users while testing) but instead it will be appended to an array (ActionMailer::Base.deliveries). ActionMailer::Base.perform_deliveries = true Ensures the mail will be sent using the method specified by ActionMailer::Base.delivery_method, and finally ActionMailer::Base.deliveries = [] sets the array of sent messages to an empty array so we can be sure that anything we find there was sent as part of our current test. From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Denise Eatherly Sent: Tuesday, June 27, 2006 5:41 PM To: rails@lists.rubyonrails.org Subject: [Rails] perform_deliveries = false Hi, Can someone explain the proper use of the use of perform_deliveries in the environment.rb file?? ActionMailer::Base.perform_deliveries = false I just moved a new controller to the production version of an app, but wanted to be sure everything was properly configured before sending out a big mailing, so I set perform_deliveries = false, believing that would prevent mail from being sent. Big surprise when my entire mailing list got a copy of the email I was testing. Is there something ELSE I need to do to keep mail from being sent? Thanks, Denise -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060628/e52c73a1/attachment.html
Hi, That helped a lot. Thanks. But when you say "From the RoR manual" what are you using? I use http://api.rubyonrails.com/ but I didn''t find nearly as clear an explanation there. Thanks again, Denise On Jun 27, 2006, at 10:21 PM, Michael Scappa wrote:> Try > > > > ActionMailer::Base.delivery_method = :test > > > > > > From the RoR manual: > > > > However it is worth describing what each statement does > > ActionMailer::Base.delivery_method = :test > sets the delivery method to test mode so that email will not > actually be delivered (useful to avoid spamming your users while > testing) but instead it will be appended to an array > (ActionMailer::Base.deliveries). > > ActionMailer::Base.perform_deliveries = true > Ensures the mail will be sent using the method specified by > ActionMailer::Base.delivery_method, and finally > > ActionMailer::Base.deliveries = [] > sets the array of sent messages to an empty array so we can be sure > that anything we find there was sent as part of our current test. > > > > > > > > From: rails-bounces@lists.rubyonrails.org [mailto:rails- > bounces@lists.rubyonrails.org] On Behalf Of Denise Eatherly > Sent: Tuesday, June 27, 2006 5:41 PM > To: rails@lists.rubyonrails.org > Subject: [Rails] perform_deliveries = false > > > > Hi, > > > > Can someone explain the proper use of the use of perform_deliveries > in the environment.rb file?? > > > > ActionMailer::Base.perform_deliveries = false > > > > I just moved a new controller to the production version of an app, > but wanted to be sure everything was properly configured before > sending out a big mailing, so I set perform_deliveries = false, > believing that would prevent mail from being sent. Big surprise > when my entire mailing list got a copy of the email I was testing. > Is there something ELSE I need to do to keep mail from being sent? > > > > Thanks, > > Denise > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060628/f81b6953/attachment.html