Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is it possible to let the user opt out to receive emails? I got a rule that send out emails to every user of a roll, but i still wanna allow ppl to opt out to get automated emails.
Comments
Comment #1
Les LimCreate an additional role called "Opt out" or something similar. Then add another "User has role" condition to your rule, set to the "Opt Out" role and "Negate".
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedgood idea, will do that way. thanks.
can also use a user flag with an flag action->role change for a nice UI for the user.
Comment #4
jvieille CreditAttribution: jvieille commentedThe proposed solution does not make sense to me.
A condition will check either the acting user or the content user, never the users who will be targeted by the "send email" action.
Is there any means to prevent a user of receiving emails blindly sent by a rules' action?
Comment #5
jvieille CreditAttribution: jvieille commentedBelow a solution : add excluded roles selection so people can be opted out by granting them a role like "OptOut"
(not a patch, sorry)
in mimemail.rules_forms.inc
mimemail.rules.inc
Comment #6
TR CreditAttribution: TR commentedSeveral solutions to this support request were provided above.
Comment #7
TR CreditAttribution: TR commented