From a00291080add0735803438dad01df7de45657edb Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Tue, 29 Mar 2022 11:41:21 +0200 Subject: [PATCH] Suppress the output of internal PHP errors when sending mails as there's custom handling for that --- system/libraries/Email.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 01f513b2..05476113 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1862,12 +1862,12 @@ class CI_Email { if ( ! $this->_validate_email_for_shell($from)) { - return mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str); + return @mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str); } // most documentation of sendmail using the "-f" flag lacks a space after it, however // we've encountered servers that seem to require it to be in place. - return mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str, '-f '.$from); + return @mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str, '-f '.$from); } // --------------------------------------------------------------------