Skip to:
Content
Pages
Categories
Search
Top
Bottom

Mass email function

  • @csseur3

    Member

    Hello,

    i want to send an email for all the members. There is a mass email plugin?

    Bye

Viewing 12 replies - 1 through 12 (of 12 total)
  • @chrishajer

    Participant

    There is no plugin like that that I know of.

    @detective

    Member

    I have a custom plugin for that. Here are the two important functions:

    function bb_mail_users($subject, $content) {
    global $bbdb;
    $users = $bbdb->get_results("SELECT ID, user_login, user_email FROM $bbdb->users");
    foreach ($users as $user)
    bb_mail_user($user->ID, $user->user_login, $user->user_email, $subject, $content);
    }

    function bb_mail_user($user_id, $user_login, $user_email, $subject, $message) {
    $message = str_replace('%user_login%', $user_login, $message);
    $message = str_replace('%user_id%', $user_id, $message);
    $message = str_replace('%user_email%', $user_email, $message);

    $subject = str_replace('%user_login%', $user_login, $subject);
    $subject = str_replace('%user_id%', $user_id, $subject);
    $subject = str_replace('%user_email%', $user_email, $subject);

    bb_mail($user_email, $subject, $message);
    }

    I think it’s pretty straightforward. You can write a message like: “Hello, %user_login%, how are you? Thanks for participating in this forum :)” and a subject like “Thanks, %user_login%”. Then, to mail that to all your users:

    $content = "Hello, %user_login%, how are you? Thanks for participating in this forum :)";
    $subject = "Thanks, %user_login%";
    bb_mail_users($subject, $content);

    @_ck_

    Participant

    If you have a large number of members, this is a positively guaranteed way to get your server IP banned by most major email services like gmail, hotmail, yahoo and aol.

    @csseur3

    Member

    nice, detective :)

    but could you make a plugin with a graphic administration? now, there is a bit complicated to use for me and my other administrators lol :p

    ck, what is better?

    @detective

    Member

    I have an admin interface, but it’s ugly and incomplete. I think a plugin for mass mailing your users should have an opt-out option (and opt-in at registration), which i haven’t implemented.

    I don’t agree with _ck_, because a forum or a community should have a way to give important messages to its users (sometimes you can’t rely on RSS). If such functionality is not being used correctly, well, that’s another case. And i don’t think Google or another service could ban you if you present a normal usage (ie., not thousands of e-mails every minute).

    @citizenkeith

    Participant

    I’m a member of a few forums that send out announcements.

    Some hosts will limit the number of emails you can send at once though. Dreamhost, for instance, has a limit of 100 per hour (one of the many reasons I’ll be leaving them soon).

    It would be overkill for some sites, but it would be nice to have a plugin for PHPList that would share a WordPress and/or bbPress user database; one that would allow user control of mailing list preferences in the WordPress or bbPress profile.

    @chrishajer

    Participant

    PHP List interface/plugin is a good idea.

    http://www.phplist.com/

    @myrontay

    Member

    I can’t believe I’ve not seen phplist around before. :D Thanks!

    @finalwebsites

    Participant

    If you have a large number of members, this is a positively guaranteed way to get your server IP banned by most major email services like gmail, hotmail, yahoo and aol.

    What is your advice to send a newsletter to 10.000 bbpress forum members?

    @chrishajer

    Participant

    My recommendation would be to hire an email marketing service.

    http://myemma.com/

    http://www.constantcontact.com/

    http://www.aweber.com/

    http://www.verticalresponse.com/

    http://www.profollow.com/

    There are so many of them. I don’t have an affiliation with any of them, but outsourcing this function is better than trying to send them all from your server IMO.

    @chrishajer

    Participant

    One other thing: when your IP gets banned, you might also affect other customers on the same shared server. That’s a good way to get booted off your host, affecting their other customers.

    @_ck_

    Participant

    Any shared host worth their salt will automatically, immediately and permanently suspend an account sending that many emails per hour anyway.

    Any site sending that many messages needs a dedicated email server with an IP that’s registered on whitelists (costs $$$) so major providers will accept that kind of traffic. http://goodmail.com http://www.senderscorecertified.com http://www.isipp.com are examples of popular whitelist services. You also need to make sure the server has rDNS, SenderID, SPF and DomainKeys.

    With some additional code and the use of cron, Detective’s code could be made to send only a few emails per minute, and track that the same domain does not get an email again within a few minutes. That might slow down the banning a little but we’re getting into spammer territory there and I’m not making such a tool available (also phplist does all that anyway).

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Skip to toolbar