Having the ability to easily comply to CAN-spam and other email legislation without having to add an if clause to _everywhere_ you are sending out email would be nice.
Looks like you can already do something like this a mail interceptor: http://stackoverflow.com/questions/8594626/how-to-add-a-before-filter-in-usermailer-which-checks-if-it-is-ok-to-mail-a-user, though the OP never responded whether that works or not. -- Richard Schneeman http://heroku.com @schneems (http://twitter.com/schneems) On Thursday, July 19, 2012 at 10:43 AM, Thibaut Barrère wrote: > Hi, > > I met the same need (eg: to avoid sending any email until the user is > "confirmed" for instance) but did not implement anything yet. > > I would probably just create a custom_mail method to be used in place > of mail, which would decide based on your logic if mail must be called > or not. > > That said having a "global" hook to stop delivery could be useful too. > > Just a thought! > > -- Thibaut > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com > (mailto:rubyonrails-core@googlegroups.com). > To unsubscribe from this group, send email to > rubyonrails-core+unsubscr...@googlegroups.com > (mailto:rubyonrails-core+unsubscr...@googlegroups.com). > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.