Currently Rules allows modules great power to create a wealth of different email actions, especially with the harnessed power of tokens. However ideally, especially these days, users should have the option to turn off or on email notification, so messages are not forced upon them. I realize this should probably be module specific rather than a global flag, but I wonder how this can interface with Rules.
Is it at all possible to do this with the php validator? Maybe with the combination of a checkbox provided by the module in question which can enable or disables a token [user:no_email]?
Kind regards,
Marius
Comments
Comment #1
mercmobily commentedHi,
I *personally* think that *some module* should create the right tokens according to the defined profile variables. That way, they can be checked/compared without any trouble.
But... I am not which module should be in charge of that. If you direct me a little, I will code it.
Bye!
Merc.
Comment #2
amitaibuIMO integration with http://drupal.org/project/notifications is the right thing.
Comment #3
mercmobily commentedHi,
@Amitaibu: from my understanding, the "notifications" module aims at allowing people to subscribe to specific events. Rules allows a lot more than that, and that's what FriendList needs. For example, when User A makes friend with User B, an email to User B is triggered, but then quite possibly other things might -- and will -- happen. For example, User A also might get an email, OR User B might automatically become friends with User A, and so on.
I don't see emails to users in the scope of FriendList as a notification as such. It's more of a system message.
I mean, it would be _nice_ to add a hook to FriendList once notifications reaches a stable version. But that shouldn't be "the" way for FriendList to communicate.
Or am I missing something?
Merc.
Comment #4
amitaibu@mercmobily,
you are right, I meant this module - http://drupal.org/project/messaging (which notifications is based on).
Comment #5
mercmobily commentedHi,
@amitaibu: I think the best and most logical route is to wait till the Notification module has "Rules" support. That way, admins can set, when an event is triggered, to send a message to a user (using Messaging) rather than sending an email straight.
I found this request -- to which you are subscribed:
#212865: Rules integration: adding an action
So, we need to wait.
Merc.
Comment #6
mercmobily commentedHi,
to clarify: I am pretty definite the best way to go about this is to make user profile tokens available. let's see what the maintainer of Rules says when he gets back, without crowding this issue too much.
Merc.
Comment #7
fagohm, tokens are a possible way to go. But they are not intended for checking stuff, so the better way would be to add conditions for that like I'm doing in the WIP cck integration: http://drupal.org/node/299706
Integrating with messages and/or notifications makes definitely sense.
Comment #8
mitchell commentedI used flag in a similar situation. When a user is flagged 'subscribed,' they receive updates; hence add a condition whether or not the user is subscribed to the node.
With Flag's #298109: Rules integration, you can make a rule to autosubscribe a node author or comment author with a non-global flag, and then they can still unsubscribe themselves later.
Comment #10
mitchell commentedUpdated component.