This commit is contained in:
parent
dd16b7d95b
commit
677ff5b2f9
|
|
@ -28,7 +28,10 @@ $mail->Username = 'yourname@example.com';
|
|||
$mail->Password = 'yourpassword';
|
||||
$mail->setFrom('list@example.com', 'List manager');
|
||||
$mail->addReplyTo('list@example.com', 'List manager');
|
||||
$mail->addCustomHeader('List-Unsubscribe', '<mailto:unsubscribes@example.com>, <https://www.example.com/unsubscribe.php>');
|
||||
$mail->addCustomHeader(
|
||||
'List-Unsubscribe',
|
||||
'<mailto:unsubscribes@example.com>, <https://www.example.com/unsubscribe.php>'
|
||||
);
|
||||
$mail->Subject = 'PHPMailer Simple database mailing list test';
|
||||
|
||||
//Same body for all messages, so set this before the sending loop
|
||||
|
|
@ -58,7 +61,7 @@ foreach ($result as $row) {
|
|||
$mail->replaceCustomHeader(
|
||||
'List-Unsubscribe',
|
||||
'<mailto:unsubscribes@example.com>, <https://www.example.com/unsubscribe.php?email=' .
|
||||
rawurlencode($row['email']).'>'
|
||||
rawurlencode($row['email']) . '>'
|
||||
);
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue