Bulk Email Users

JoeCotellese - August 17, 2004 - 17:38

I'm trying to find out if there is a module that let's me send out a bulk email notification to all users on my drupal site. I know about the subscription module but that's not exactly what I have in mind. I'm looking for just a form on the administration pages that allows me to send an email to the users of the site.

It doesn't seem like it would be too hard to implement I just don't want to reinvent the wheel.

See previous posts on this topic

nedjo - August 19, 2004 - 03:21

...here and here. Specifically, killes suggested looking at portions of the devel.module, http://drupal.org/project/devel. A module for sending email to users, with ability to filter mail sent by role and profile parameters would be useful...

Module available

nedjo - August 21, 2004 - 00:27

I've drafted a quick module for emailing users, see

http://cvs.drupal.org/viewcvs/contributions/modules/mail/.

Sweet

JoeCotellese - August 21, 2004 - 03:17

Thanks, I'll check it out.

Joe Cotellese
FWScan-You Are Vulnerable-

really old thread update

mgifford - January 29, 2008 - 18:18

This is an ancient post, but figured since I got here via a search engine others might too. I think the current modules for doing this are presently:
http://drupal.org/project/mass_contact
http://drupal.org/project/advuser

I haven't used either of them yet, but plan to use advuser soon. Both are beta as of Jan 2008.

Mike
--
OpenConcept | SEO | Tech | Screencasts

I got this page from

Teerr - March 25, 2008 - 13:43

I got this page from google!

Thanks a lot man.. I am looking for the same.

THANK YOU

I found this from Google

N.Simpson - May 16, 2008 - 22:07

I found this from Google too. Was looking for a 6.x solution. I'll post back here if I find one soon.

Drupal 6 email users module ?

wwwoliondorcom - January 22, 2009 - 07:59

Drupal 6 email users module ?

Hi, I am also looking fo a Drupal 6 solution, any news ?

Thanks.

_

WorldFallz - January 22, 2009 - 19:20

From 3 comments up: http://drupal.org/project/mass_contact

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

mailout

KingMoore - May 16, 2008 - 23:45

the mailout module should do what you want

http://drupal.org/project/mailout

Not for D6 yet though...

N.Simpson - May 28, 2008 - 00:00

Not for D6 yet though...

Also in need for a D6

klaasvanschelven - June 11, 2008 - 22:17

Also in need for a D6 version of *any* of these modules. Anyone up to speed on how to supply the corresponding requests?

Drupal 6 bulk e-mail?

roquestrew - June 12, 2008 - 21:15

I'm wondering if this is possible, too. What a great module that'd be!

Mass Contact Module

haydeniv - January 1, 2009 - 20:35

You may want to check out the Mass Contact Module
Just don't forget to read the info about the module. I missed the line that the menu item is disabled by default. Took me a little bit to find that.

My Solution

klaasvanschelven - June 14, 2008 - 12:33

This is my drupal 6 solution. No packaging, code standards and whatnot. Only one option: send mail to all. No variables. It works for me though... Please let me know if you have any improvements (including packaging, which you're free to do)

Create a folder "bulkmail" under sites/all/modules
Paste in two files:

bulkmail.info

name = Bulkmail
description = Send a mail to all users.
core = 6.x

bulkmail.module

<?php
function bulkmail_perm() {
    return array(
'access bulkmail content');
}

function
bulkmail_menu() {
   
$items = array();
   
$items['bulkmail'] = array(
       
'title' => t('Send Bulk Mail'),
       
'page callback' => 'drupal_get_form',
       
'page arguments' => array('bulkmail_form'),
       
'access arguments' => array('access bulkmail content'),
       
'type' => MENU_NORMAL_ITEM,
    );
    return
$items;
}

function
bulkmail_form() {
   
$form['subject'] = array(
       
'#type' => 'textfield',
       
'#title' => t('Subject'),
       
'#required' => TRUE,
    );
   
$form['body'] = array(
       
'#type' => 'textarea',
       
'#title' => t('Body'),
       
'#required' => TRUE,
    );
   
$form['submit'] = array(
       
'#type' => 'submit',
       
'#value' => t('Send')
    );

    return
$form;
}

function
bulkmail_form_submit($form, &$form_state) {
   
$params = array();
   
$params['subject'] = $form_state['values']['subject'];
   
$params['body'] = $form_state['values']['body'];

   
$result = db_query("SELECT mail FROM {users}");
    while (
$user = db_fetch_object($result)) {
       
drupal_mail('bulkmail', 'ignored', $user->mail, language_default(), $params, NULL, TRUE);
    }
   
drupal_set_message(t('Your message has been sent.'));
}

function
bulkmail_mail($key, &$message, $params) {
   
$message['subject'] = $params['subject'];
   
$message['body'] = $params['body'];
}
?>

Have fun with it. If this was useful to you and you feel like doing something back, you could recommend me on LinkedIn
http://www.linkedin.com/in/klaasvanschelven ([become linkedin member] > make friends with me > write a nice recommendation)

--
Klaas van Schelven
www.xaba.nl

I tried

cem kaan - June 24, 2008 - 14:02

Yes, it works but I disabled module after I used it.

Hi, this looks interesting.

no_idea_yet - June 26, 2008 - 12:56

Hi, this looks interesting. I've created the directory and the two files, enabled the module . . . now what? How do I actually compose and send an email?

Regards
H

As far as I know it should

klaasvanschelven - June 29, 2008 - 19:57

As far as I know it should give you a menu item... "Send Bulk Mail" but you may have to activate it in "menus"

--
Klaas van Schelven
Open Source and Open Standards (Dutch)

That's embarrassing! Thanks

no_idea_yet - June 30, 2008 - 01:09

That's embarrassing!

Thanks klaasvanschelven for pointing me in the right direction, it is in fact in there, enabled by default . . . just not in the menu I expected and for some reason, until checking again just now, couldn't find it!

Much appreciated :)

One more thing you may want

ProfStein - March 7, 2009 - 17:56

One more thing you may want to keep in mind. When I first used the module, I had to set up TWO contact groups (even though I had only one subset of registered users I needed to send bulk email to) before it would send an email.

When I set up the first list and tried sending an email, it acted like it worked, but it didn't. So I set up a second (dummy) list, which then prompts a selectbox option when you're composing the email. Apparently something in the module needs to have the selectbox available to actually send the email.

If my explanation doesn't make sense, or if your experience was different, let me know.

What about Hosting Provider's send limitations?

cozzi - March 18, 2009 - 13:05

This look interesting, but my hosting provider has a limit of 500 emails/hour. I think this module would try to send to all of my (2K) accounts at once, yes/no? In which case 1500 messages would hit the dirt.

_

WorldFallz - March 18, 2009 - 14:05

I believe that's one of the issues the http://drupal.org/project/queue_mail module is aimed at alleviating.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Great solution - can it be used for just 'friends' or 'fans'?

halfabrain - September 18, 2009 - 15:56

Thanks klaasvanschelven for a great script. Is it possible to amend this so that it sends emails to all a users "friends" or "fans" as determined by the user-relationships module?
H

_

WorldFallz - September 18, 2009 - 16:17

You might be able to use http://drupal.org/project/views_mail for that.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Thanks WorldFallz. I followed

halfabrain - September 21, 2009 - 11:15

Thanks WorldFallz. I followed your suggestion but I cannot get my head around how this module works. I appreciate that the author of the module has said he needs time to write up documentation for it, so I guess I'll sit tight and wait for it to appear.

Thanks for the suggestion though,

H

 
 

Drupal is a registered trademark of Dries Buytaert.