mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
fixing duplicate emails being sent with MailTransport fixes #2022
This commit is contained in:
parent
22029a1199
commit
883f579670
1 changed files with 1 additions and 2 deletions
|
@ -44,8 +44,7 @@ class MailTransport extends AbstractTransport {
|
||||||
if (!@mail($to, $email->subject(), $message, $headers)) {
|
if (!@mail($to, $email->subject(), $message, $headers)) {
|
||||||
throw new SocketException(__d('cake', 'Could not send email.'));
|
throw new SocketException(__d('cake', 'Could not send email.'));
|
||||||
}
|
}
|
||||||
}
|
} elseif (!@mail($to, $email->subject(), $message, $headers, $this->_config['additionalParameters'])) {
|
||||||
if(!@mail($to, $email->subject(), $message, $headers, $this->_config['additionalParameters'])) {
|
|
||||||
throw new SocketException(__d('cake', 'Could not send email.'));
|
throw new SocketException(__d('cake', 'Could not send email.'));
|
||||||
}
|
}
|
||||||
return array('headers' => $headers, 'message' => $message);
|
return array('headers' => $headers, 'message' => $message);
|
||||||
|
|
Loading…
Add table
Reference in a new issue