Hi,
I would like to use views to send bulk emails. I created a tabular view with n number of rows in which a row would like this with title, date and email being the fields corresponding to a particular content type.

Title Date Email
---- -------- -------
Test 10/26/11 test@test.com

I would like to send an email to all the email addresses in the email column directly from this view. I am not sure how to do this using views bulk operations, which gives me an option to select whichever rows i want to by adding a checkbox to each row and also gives me a dropdown where i could pick "Send an email" option, but i am not sure how to configure it such that it would automatically send the email to the addresses in the rows that i selected. I see that it takes me to a page where i have to manually enter the recipients email address. I am also attaching a screenshot which shows part of the view that i created.

I would like to know if anybody has implemented something like this. Any help would be appreciated.

Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

trevorkjorlien’s picture

I was looking for the exact same functionality last night. Unfortunately, I couldn't find any way with the default VBO, or any sort of combination with the Rules module.

Luckily, I did find a module called Views Send (http://drupal.org/project/views_send). Right now, there's only a Drupal 6 release, but looking through the issue queue, there's been some work done for a Drupal 7 version (http://drupal.org/node/1052040#comment-4653934).

I installed it last night, and though not absolutely perfect, it does get the job done for me. I believe a lot of the errors I got were from me using a local install with SMTP module. Once the site is on a web server, I imagine a lot of those errors not popping up.

Attached is a screenshot of the View I set up.

One caveat: after pressing "Send emails", they don't actually get sent until the next time Cron runs. I suppose one could set up a Rule to run cron whenever this gets triggered, or run cron every 20 minutes, or something.

trevorkjorlien’s picture

To note, the drop-down in the image in my last post was a taxonomy filter I set up in Views to filter down which classes to send emails to. You might want that functionality too if you're categorizing your contacts.

Saratt’s picture

Thank you trevorkjorlien, will try that.

bojanz’s picture

Status: Active » Fixed

The "Send an email" action was broken. Just committed a fix.

In #1346896: VBO Send e-mail not working I said:

The correct token is [user:mail].
However, [user:mail] and other [user] tokens were broken in beta3.
I have just committed a fix for that, and am planning to tag VBO 7.x-3.0-RC1 in the next 24h.

So, get the latest VBO version (tomorrow's dev or RC1 as soon as I tag it), create a user view, and use the "Send e-mail' action provided by core. You can enter [user:mail] as the recipient.

Alternatively, you can use Views Send when it becomes stable, but this does the job for now.
You can also use a Rules component for this, allowing you to have certain parameters preconfigured (like the recipient), and certain requested from the user.
I am also thinking of perhaps having a custom "send email" action provided by VBO, which would at least show all available tokens like Rules does when you use it.

theneemies’s picture

FileSize
6.06 KB

I must be missing something obvious. I've updated to the latest dev version (not sure if it's too early for your fix to have been applied ... it's already 7th Feb Down Under ...).

When I select records & click through to 'send email' it asks me for the recipient's email - shouldn't that be auto-determined based on my view? << screenshot attached

bojanz’s picture

No. How could it? You enter the token.

WebJohn’s picture

Fantastic, thanks bojanz this works great.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bsandor’s picture

to #5
You should choose 'views send' in rules to send mail not to get recipients input field

drummondf’s picture

Issue summary: View changes