Skip to content

Commit

Permalink
Merge pull request #44 from nliautaud/41-from-server-noreply
Browse files Browse the repository at this point in the history
fix #41 use no-reply@server as from header
  • Loading branch information
nliautaud authored Jan 27, 2019
2 parents eedd801 + 4650c3a commit 4167d06
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions p01-contact/src/P01contact_Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,8 @@ public function sendMail()
private function mailHeaders($name, $email, $mime_boundary)
{
$encoded_name = $this->encodeHeader($name);
$headers = "From: $encoded_name";
$headers = "From: $encoded_name <no-reply@" . SERVERNAME . ">\n";
if ($email) {
$headers .= " <$email>\n";
$headers .= "Reply-To: $encoded_name <$email>\n";
$headers .= "Return-Path: $encoded_name <$email>";
}
Expand Down

0 comments on commit 4167d06

Please sign in to comment.