Definition at line 39 of file Sendmail.php.
◆ __construct()
__construct |
( |
|
$parameters = null | ) |
|
Constructor.
- Parameters
-
string | array | Zend_Config | $parameters | OPTIONAL (Default: null) |
- Returns
- void
Definition at line 74 of file Sendmail.php.
◆ _handleMailErrors()
_handleMailErrors |
( |
|
$errno, |
|
|
|
$errstr, |
|
|
|
$errfile = null , |
|
|
|
$errline = null , |
|
|
array |
$errcontext = null |
|
) |
| |
Temporary error handler for PHP native mail().
- Parameters
-
int | $errno | |
string | $errstr | |
string | $errfile | |
string | $errline | |
array | $errcontext | |
- Returns
- true
Definition at line 199 of file Sendmail.php.
201 $this->_errstr = $errstr;
◆ _prepareHeaders()
_prepareHeaders |
( |
|
$headers | ) |
|
|
protected |
Format and fix headers
mail() uses its $to and $subject arguments to set the To: and Subject: headers, respectively. This method strips those out as a sanity check to prevent duplicate header entries.
@access protected
- Parameters
-
- Returns
- void
- Exceptions
-
- See also
- Zend_Mail_Transport_Exception
-
Zend_Mail_Transport_Exception
-
Zend_Mail_Transport_Exception
Definition at line 127 of file Sendmail.php.
133 #require_once 'Zend/Mail/Transport/Exception.php'; 139 if (0 === strpos(PHP_OS,
'WIN')) {
141 if (empty($this->recipients)) {
145 #require_once 'Zend/Mail/Transport/Exception.php'; 150 if (!isset($headers[
'To'])) {
154 #require_once 'Zend/Mail/Transport/Exception.php'; 158 unset($headers[
'To'][
'append']);
159 $this->recipients = implode(
',', $headers[
'To']);
163 unset($headers[
'To']);
166 if (isset($headers[
'Subject'])) {
167 unset($headers[
'Subject']);
171 if (isset($headers[
'From'])) {
172 $addressList = array_filter($headers[
'From'],
function ($key) {
173 return $key !==
'append';
174 }, ARRAY_FILTER_USE_KEY);
176 if (preg_match(
'/\\\"/',
$address)) {
183 parent::_prepareHeaders($headers);
186 $this->header = rtrim($this->header);
◆ _sendMail()
Send mail using PHP native mail()
@access public
- Returns
- void
- Exceptions
-
- See also
- Zend_Mail_Transport_Exception
Definition at line 96 of file Sendmail.php.
98 set_error_handler(array($this,
'_handleMailErrors'));
101 $this->_mail->getSubject(),
104 restore_error_handler();
106 if ($this->_errstr !==
null || !
$result) {
110 #require_once 'Zend/Mail/Transport/Exception.php';
◆ $_errstr
◆ $EOL
◆ $parameters
◆ $subject
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Mail/Transport/Sendmail.php