From 7adc9b3fbf83843d7a24cc896b4266d6485dbdfa Mon Sep 17 00:00:00 2001
From: Jesse Norell <jesse@kci.net>
Date: Wed, 11 Nov 2020 13:07:22 -0700
Subject: [PATCH] always set envelope sender address in ispcmail class

---
 server/lib/classes/ispcmail.inc.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server/lib/classes/ispcmail.inc.php b/server/lib/classes/ispcmail.inc.php
index fbf5f84dca..2b3dc78cfc 100644
--- a/server/lib/classes/ispcmail.inc.php
+++ b/server/lib/classes/ispcmail.inc.php
@@ -824,8 +824,7 @@ class ispcmail {
 				else $rec_string .= $recip;
 			}
 			$to = $this->_encodeHeader($rec_string, $this->mail_charset);
-			//$result = mail($to, $subject, $this->body, implode($this->_crlf, $headers));
-			$result = mail($to, $enc_subject, $this->body, implode($this->_crlf, $headers));
+			$result = mail($to, $enc_subject, $this->body, implode($this->_crlf, $headers), "-f $this->_mail_sender");
 		}
 
 		// Reset the subject in case mail is resent
-- 
GitLab