• I have an intranet-type site where we host company training. One of the features we have is that when new safety protocols are put into place, we upload the new document and send an email to all employees to read the document, log in and certify that they read it.

    This email can go out to 2500 employees in a single go. I used to send it by looping through the users and using wp_mail, but that was timing out as the numbers grew. So I started sending it using Blind Carbon Copy or Bcc headers. We need to switch to Mandrill so that we can feel more confident in the emails getting received, but what is the best way to send massive emails periodically to employees?

    Any ideas would be great. The plugin is custom, so if we need to replace wp_mail, that would be fine…

    Thanks.

    http://wordpress.org/extend/plugins/wpmandrill/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    It’s not clear how you’re linking in with wpMandrill, since wpMandrill takes over the wp_mail function, but I can give you some general information on how you’d send this with Mandrill, and then if you need more clarification, just let me know!

    BCC addresses through the API aren’t tracked in Mandrill, so only one can be specified per API call. Since only one can be provided via the API, the approach for sending to multiple recipients without them seeing every other recipient’s information is to put the recipients in the to parameter, and then set the preserve_recipients flag to false (this flag tells Mandrill to generate the To header for each recipient instead of including all recipients in that header). You can also set the default for your account to not preserve the headers, but it can be a good idea to declare that on a per-API-call basis when you’re sending bulk

    Thread Starter Jupitercow

    (@jcow)

    I think that makes sense. I will be testing this out later in the week.

    Currently, I am using wp_mail() to send and looping through users to add them to header:

    $headers[] = 'Bcc: '. $user->display_name .' <'. $user->user_email .'>';

    Previously, I was looping through the users and just wp_mail() sending for each individual, but with 2500 users, it started to have issues. I was looking at going back to that method once we switch to Mandrill, but was worried the server might still time out on me, though I am told by hosting that if I can loop through all of the users to send, I shouldn’t have any issues once Mandrill is in place because my previous problem was because their mail server doesn’t like sending that many emails…

    So I will test the method of ‘preserve recipients’ flag and adding the users to “TO:” instead of “BCC:”.

    Thanks for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I don't understand how to send to multiple users since Bcc doesn't work…’ is closed to new replies.