Voting starts in March for the Drupal Association Board election.
Views Send enables you to execute personalized mass mailing from a View.
Each row in the View generates one e-mail. The fields in the View can be used in the subject and mail body - through tokens - enabling easy personalized e-mails. The recipients (mail address and name) are obviously also take from the view.
How does it work?
- Create a view and add at least one column containing e-mail addresses.
- [Optional] Expose Views filters to let the user easily build list of recipients using UI.
- For Drupal 7 and 8
- Add the "Global: Send E-mail" field to your view. This field provides the checkboxes that allow the user to select multiple rows.
- Create a "Page" (or "Block") display.
- For Drupal 6
- Create a "Page" display and set the style to "Bulk Operations".
- On "Bulk Operations" style configuration, under "Selected operations", select
Send mass mail (views_send_mail_action).
- Save the view - obviously.
Usage - sending the e-mails
- Open the page defined in the View, use exposed filters to build the list, select all or some rows and then
- Either click the "Send e-mail" button on Drupal 7 and 8, or choose the VBO action "Send mass mail" on Drupal 6.
- Fill the message form to configure the e-mail. Use tokens to personalize your e-mail. The module provide also row-based tokens, taken from the current row of the view. For example, if the view has a column with the key
users_name(the user name) you can use a replacement token -
[views-send:users_name]for Drupal 7 and 8, and
[views-send-users_name]for Drupal 6.
- Preview and send the message.
Note: For Drupal 6 messages are always queued in a spool table and delivered only on cron. (You can control how many messages will be send per cron run.) For Drupal 7 and 8 you can select to send the message directly using the Batch API in stead.
Dependencies & Integration
- Views, of course.
- The Drupal 6 version of Views Send depends on Views Bulk Operations (VBO) - version 1.11 or newer.
- The module integrates features from:
- Mime Mail. When the Mime Mail module is enabled, the user can choose to send rich HTML messages and/or use attachments.
- Token. When the Token module is enabled, the user can insert context tokens into the subject or body of the message. Note that row-based tokens are available even if the Token module is disabled.
- Rules. (Drupal 7 only.) When the Rules module is enabled, the user can define actions for when emails are sent and/or placed in the spool.
- Drupal 8 only (as of January 2017): Enabling Mime Mail (and the dependency Mail System) no longer breaks the module. However, to make it actually send HTML e-mails you need to:
- Set "Full HTML" as the e-mail format on admin/config/system/mimemail
- Manually add a mail system configuration for the Views Send module with key "direct" with "Mime Mail mailer" as the formatter at admin/config/system/mailsystem
- You might need to apply the fix from issue 2806795.
- If you need to send more than 1000 messages at once, i.e., select more than 1000 rows in the view, make sure that max_input_vars (in php.ini) is larger than the default value of 1000.
- If you run into MySQL errors or experience that you can't proceed to the confirmation page due to the error "Please select at least one item", there are two things you can do to try to fix this:
- Increase max_allowed_packet for MySQL. Try 8M, 16M, 32M and 64M. If still no luck, try:
- Increase innodb_log_file_size for MySQL. Try 8M, 16M, 32M, 64M and 128M ...
Related issue: 1905104.
- If you use the Token module, you may experience WSOD because your server runs out of memory. You can fix this by using the Token Tweaks module and reducing the depth limit for the token tree UI.
- Drupal 6 only: Views Bulk Operations (VBO) version 1.16 (or newer) requires Views Send 6.x-1.0-rc1.
You may want to try also:
- Simplenews. See what are the advantages over Simplenews.
- Views Rules (Drupal 7 only). Use this module if you want to send bulk/mass mail from Rules based on results from a View.
Some pieces of code were inspired by Simplenews module.
How can you get involved?
- Write a review for this module on drupalmodules.com.
- Help translate this module at localize.drupal.org.
Maintainers & Sponsors
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Views
- Reported installs: 5,020 sites currently report using this module. View usage statistics.
- Downloads: 95,005
- Last modified: February 1, 2017
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.