On this page
Setup and usage
Last updated on
11 October 2023
Setup
- Create a view with format table (of fields), and add at least one fields containing e-mail addresses.
- [Optional] Expose Views filters to let the user easily build list of recipients using UI.
- 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.
- Save the view - obviously.
- If you use the Mail System module: Go to
admin/config/system/mailsystemand add the preferred setting for the Views Send module with key "direct". Most of the modules that enable Drupal to send HTML/Mime mail, uses mail system.
Usage
- Open the page defined in the View, use exposed filters to build the list, select all or some rows and then
- Click the "Send e-mail" button.
- 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]. - Preview and send the message.
Note: You can either queue the messages in a spool table and delivered on cron, or you can select to send the message directly using the Batch API in stead.
Dependencies & Integration
- Views, of course (which is part of Drupal core).
- 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. When the Rules module is enabled, the user can define actions for when emails are sent and/or placed in the spool. (Worked great in Drupal 7, very little tested for Drupal 9 /10.)
- Mailing List. This module provides subscription blocks for different mailing lists/campaigns. Use Views Send to send mail to the subscribers.
Known issues
- If the mail address is taken from a user (for example through a relation to the content author) and not a content field, you have to be administrator or have the "View user email addresses" permission. If not, the mail address will not display in the view.
- You can't use a Views Send field and a (core) bulk update field in the same view.
- If your view has multiple pages, then token replacement might not work. (See #3339338: No view token in body)
- If you use Swift Mailer or Mailchimp Transactional for formatting of mail messages, you also have to use it for sending.
- If you use Swift Mailer or Mailchimp Transactional and send attachments, you have to select "Send the message directly using the Batch API" when sending the message.
See also known issues for the Drupal 7 version of the module. Some D7 issues might be relevant.
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion