mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed methods to integrate with CakeEmail.
This commit is contained in:
parent
1ee8ad6d8e
commit
0bf8e3483b
1 changed files with 6 additions and 4 deletions
|
@ -333,14 +333,16 @@ class EmailComponent extends Component {
|
|||
$lib->layout($this->layout, $this->template)->emailFormat($this->sendAs);
|
||||
|
||||
if (!empty($this->attachments)) {
|
||||
$lib->attachment($this->_formatAttachFiles());
|
||||
$lib->attachments($this->_formatAttachFiles());
|
||||
}
|
||||
|
||||
$transport = $lib->transport($this->delivery)->transportClass();
|
||||
$lib->transport($this->delivery);
|
||||
if ($this->delivery === 'mail') {
|
||||
$transport->config(array('eol' => $this->lineFeed, 'additionalParameters' => $this->additionalParams));
|
||||
$lib->config(array('eol' => $this->lineFeed, 'additionalParameters' => $this->additionalParams));
|
||||
} elseif ($this->delivery === 'smtp') {
|
||||
$transport->config($this->smtpOptions);
|
||||
$lib->config($this->smtpOptions);
|
||||
} else {
|
||||
$lib->config(array());
|
||||
}
|
||||
|
||||
$sent = $lib->send($content);
|
||||
|
|
Loading…
Reference in a new issue