Skip to main content


Showing posts from June, 2013

Send mass email to certain users using VBO

Views Bulk Operations uses the built-in actions to act upon nodes, users, entities etc. Among these actions is our ability to send emails to users. If you try to use this action though you will encounter a small but serious problem. You are asked for an email address to send your message. You might say "but I have selected the users I want this message to reach. Why should I input an address again?". Don't get overwhelmed. What this field expects is not an address but a token. Specially this token [user-email]. If the website is intended for you, then you might say that's not such a problem to write this token down again and again. But if the manager of the website is bound to be the client or if you just want to spend less time writing things down, you might prefer to use a custom hook_form_alter() callback to set a default value. It could be done in both theme and module environment so suit yourself. Just add the following in your module or theme.