Use email only for Reply-To header
This commit is contained in:
parent
6f55529236
commit
bb874d22e8
1 changed files with 4 additions and 1 deletions
|
|
@ -143,7 +143,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['contact_form_submit']
|
|||
|
||||
$mail->SetSender([$smtpConfig['from_email'] => $smtpConfig['from_name']]);
|
||||
$mail->AddRecipient([$smtpConfig['to_email'] => $smtpConfig['to_name']]);
|
||||
$mail->AddReplyTo([$formData['email'] => $formData['name']]);
|
||||
// Bare email address only: PHPMailer.Lite doesn't RFC 2047-encode the display
|
||||
// name, so a name with non-ASCII characters (æ/ø/å) or a comma produces an
|
||||
// invalid Reply-To header that some mail servers reject outright.
|
||||
$mail->AddReplyTo($formData['email']);
|
||||
$mail->SetSubject('Ny henvendelse fra kontaktskjema');
|
||||
$mail->SetBodyText($emailBody);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue