Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions inc/helpers/class-sender.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@
/*
* Decide which strategy to use, BCC or multiple "to"s.
*
* By default, we use multiple tos, but that can be changed to bcc.
* Depending on the SMTP solution being used, that can make a difference on the number of
* emails sent out.
* Default strategy is BCC. All recipients are placed in the Bcc header so
* no individual address is exposed in the To: field (GDPR/privacy compliance).
* The To: header is set to "undisclosed-recipients:;" per RFC 2822 §3.6.3.
*
* Depending on the SMTP solution being used, BCC vs individual sends can
* make a difference in the number of outbound connections made.
*/
if (apply_filters('wu_sender_recipients_strategy', 'bcc') === 'bcc') {
$main_to = $to[0];

unset($to[0]);

// Place every recipient in BCC — do not expose $to[0] in the visible To: header.
$bcc_array = array_map(
function ($item) {

Expand All @@ -148,7 +148,8 @@

$headers[] = "Bcc: $bcc";

$to = $main_to;
// RFC 2822 §3.6.3 — privacy-safe placeholder when all recipients are BCC'd.
$to = 'undisclosed-recipients:;';
}
} else {
$to = [
Expand All @@ -167,9 +168,9 @@

$attachments = $args['attachments'];

// if (isset($args['schedule'])) {

Check warning on line 171 in inc/helpers/class-sender.php

View workflow job for this annotation

GitHub Actions / Code Quality Checks

This comment is 85% valid code; is this commented out code?

// wu_schedule_single_action($args['schedule'], 'wu_send_schedule_system_email', array(

Check warning on line 173 in inc/helpers/class-sender.php

View workflow job for this annotation

GitHub Actions / Code Quality Checks

This comment is 57% valid code; is this commented out code?
// 'to' => $to,
// 'subject' => $subject,
// 'template' => $template,
Expand Down
Loading