Skip to content

Commit 4167d06

Browse files
authored
Merge pull request #44 from nliautaud/41-from-server-noreply
fix #41 use no-reply@server as from header
2 parents eedd801 + 4650c3a commit 4167d06

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

p01-contact/src/P01contact_Form.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,8 @@ public function sendMail()
427427
private function mailHeaders($name, $email, $mime_boundary)
428428
{
429429
$encoded_name = $this->encodeHeader($name);
430-
$headers = "From: $encoded_name";
430+
$headers = "From: $encoded_name <no-reply@" . SERVERNAME . ">\n";
431431
if ($email) {
432-
$headers .= " <$email>\n";
433432
$headers .= "Reply-To: $encoded_name <$email>\n";
434433
$headers .= "Return-Path: $encoded_name <$email>";
435434
}

0 commit comments

Comments
 (0)