Suppress the output of internal PHP errors when sending mails as there's custom handling for that

This commit is contained in:
Alex Tselegidis 2022-03-29 11:41:21 +02:00
parent ae2fc9ef99
commit a00291080a

View file

@ -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);
}
// --------------------------------------------------------------------