From 0bf8e3483bf8176f25ff0edbea2f9279e0f45e07 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Sun, 17 Apr 2011 12:02:26 -0400 Subject: [PATCH] Fixed methods to integrate with CakeEmail. --- lib/Cake/Controller/Component/EmailComponent.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Controller/Component/EmailComponent.php b/lib/Cake/Controller/Component/EmailComponent.php index b7a6aa836..5e2bb9d03 100644 --- a/lib/Cake/Controller/Component/EmailComponent.php +++ b/lib/Cake/Controller/Component/EmailComponent.php @@ -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);