I'm using views to select users
With the selected users I want VBO to sequentially
* suscribe the users
* send newsletter
* unsuscribe the users
I created a rules set triggered by VBO
{ "rules_test4" : {
"LABEL" : "test4",
"PLUGIN" : "rule set",
"REQUIRES" : [ "rules", "simplenews_rules" ],
"USES VARIABLES" : { "test4" : { "label" : "test4", "type" : "user" } },
"RULES" : [
{ "RULE" : {
"DO" : [
{ "simplenews_rules_action_subscribe" : { "mail" : "[test4:mail]", "tid" : "3", "confirmation" : "2" } }
],
"LABEL" : "suscrib"
}
},
{ "RULE" : {
"DO" : [ { "simplenews_rules_action_send" : { "node" : "80" } } ],
"LABEL" : "envoi"
}
}
]
}
}
When I fire this rules set via VBO the users are correctly suscribed but the newsletter is only sent to one user.
Comments
Comment #1
vensiresYou use the [test4:mail] token which is associated with the email of the user with username test4 I assume. You should use something more general like the [user:mail] token.
Comment #2
marcoka commented