I am not sure if this is a bug or a designflaw:
I have problems when I enable "Send as BCC" (which is what you usually want to hide the recipients from other users):
1) If you split up the email process, the user specified in the "Your e-mail address" receives an email for each loop, because of line 1237. (I got during my test 17 emails)
I am not sure how to fix this, but it would be nice to get only one email.
2) EMails are not being sent to the recipients when mimemail is not installed because the prepared $headers['Bcc'] variable (in line 1236) is not being passed when using drupal_mail (1256).
If drupal_mail can not handle BCC fields, the option should be disabled in the configuration from the very beginning.
1234 // set bcc
1235 if ($bcc == 1) { // hidden recipients
1236 $headers['Bcc'] = $recipient_send;
1237 $to = $from;
1238 }
1239 else {
1240 $to = $recipient_send;
1241 }
1242
1243 ++$ccc;
1244
1245 // Send the e-mail to the recipients:
1246 if (module_exists('mimemail') && variable_get('mimemail_alter', 0) == 1) {
1247 $body = implode("\n\n", $params['body']);
1248 if ($form_state['values']['html'] == 1) {
1249 $success = mimemail($from, $to, $params['subject'], $body, NULL, $headers, NULL, $message_attachment);
1250 }
1251 else {
1252 $success = mimemail($from, $to, $params['subject'], $body, TRUE, $headers, $body, $message_attachment);
1253 }
1254 }
1255 else {
1256 $success = drupal_mail('mass_contact', 'mail_page', $to, language_default(), $params, $from);
1257 }
1258
Comments
Comment #1
oadaeh commentedHow else would you like it handled? When you send an e-mail, there has to be at least one recipient in the To: field. (Some e-mail clients erroneously put what is in the BCC: field in the To: field, if there is nothing already there, negating the effect of using the BCC: field to begin with.) When you break up a mass e-mailing, you're actually telling the module to send the e-mail a $total_number_of_users_to_send_to divided by $number_of_users_to_send_to_at_one_time times. Which, in your case, was 17 times. Each of those 17 e-mails needs at least one recipient in the To: field, and since you've specified to put the recipients in the BCC: field, that To: field gets filled in with your e-mail address. If you have a better way of doing it, please let me know.
That is actually a bug, where I forgot to change the $headers['Bcc'] variables to $params['headers']['Bcc']. I corrected that in HEAD and in DRUPAL-6--1.
Does it actually send with the Mime Mail module installed, or were you just reading through the code and making assumptions? I probably should have removed the code, since there's not an official Drupal 6.x compatible release of that module, and I'm not about to entertain bug/support/feature requests for code that isn't even supported by the module's maintainer, but I've at least commented it out in the above mentioned CVS commits.
I also discovered, in testing your reports and my responses, another bug in that when selecting multiple categories, only one gets sent to. I've also fixed it in the above mentioned commits.
I'm marking this as fixed. You can re-open it (as a feature request) if you have an idea for your item 1.
Comment #2
ulf1 commentedThanks for the update.
I appreciate very much what you guys go through to support drupal.
>Each of those 17 e-mails needs at least one recipient in the To: field, and since you've specified to put the recipients in the BCC: field, that To: field gets filled in with your e-mail >address. If you have a better way of doing it, please let me know.
Only way I could think of is putting a dummy emailaddress like "do-not-reply@YOURSITE.COM" into the To: field. But I am not sure if that would be considered spam in some cases and is good practice.
So I guess you are right that there is no perfect solution.
>Does it actually send with the Mime Mail module installed, or were you just reading through the code and making assumptions?
I just reviewed the code. I have Mime Mail not installed because as you mentioned has not been updated to drupal 6.0. I probably would have if available to try it if it works.
Thanks for your help.
Ulf
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
guntherdevisch commentedHi all,
My BCC Email addresses are not receiving the e-mail, my issue: http://drupal.org/node/662018#comment-7015224
Thanks for having a look,
Gunther
Comment #5
oadaeh commentedPlease don't spam the issue queue.