-1.

I don't see the point of this option. If you don't want to send an email,
then don't call the mailer method and that's it.

Also:

3. The email content may be spammy and you want to prevent that delivery


Well, don't spam your users in the first place!

On Thu, Jul 19, 2012 at 7:37 AM, Aditya <[email protected]> wrote:

> It would be nice to have mail interceptor be able to modify the message to
> prevent delivery. Alternatively it would be nice to also prevent delivery
> in the mailer itself.
>
> The use cases are as follows:
>
>    1. User is unsubscribed and you really want to prevent emails being
>    sent to such users.
>    2. User has a guest account with a temp internal email address, which
>    you do not want to send emails to.
>    3. The email content may be spammy and you want to prevent that
>    delivery.
>
> As such you could do each by wrapping more code around the
> MyMailer.mail_action(args)/.deliver pattern but it gets repetitive quickly.
>
> This is not environment specific which is already handled very well in
> Rails since ages, this is more transactional. If we can already do this
> easily, feel free to point me to the right direction. Happy to send patch
> in due time if this is acceptable.
>
> Possible routes i'm thinking are to add options to mail itself
> (:perform_delivery => determine_delivery(args)) and/or adding ability to
> prevent delivery from interceptor.
>
> Suggestions/Ideas?
>
> /cc @mikel <https://github.com/mikel> @josevalim<https://github.com/josevalim>
>  @spastorino <https://github.com/spastorino>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Core" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-core/-/Xq3K3q2q4QIJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to