Changed the method names in transport to new form.

This commit is contained in:
Juan Basso 2011-04-03 23:37:29 -04:00
parent 174fae7d53
commit e280a7cc5d
2 changed files with 8 additions and 8 deletions

View file

@ -39,11 +39,11 @@ class MailTransport extends AbstractTransport {
$to = $headers['To'];
unset($headers['To']);
$header = $this->_headersToString($headers, $eol);
$message = implode($eol, $email->getMessage());
$message = implode($eol, $email->message());
if (ini_get('safe_mode')) {
return @mail($to, $email->getSubject(), $message, $header);
return @mail($to, $email->subject(), $message, $header);
}
return @mail($to, $email->getSubject(), $message, $header, (string)Configure::read('Email.Mail.AdditionalParameters'));
return @mail($to, $email->subject(), $message, $header, (string)Configure::read('Email.Mail.AdditionalParameters'));
}
}

View file

@ -139,12 +139,12 @@ class SmtpTransport extends AbstractTransport {
* @thrown SocketException
*/
protected function _sendRcpt() {
$from = $this->_cakeEmail->getFrom();
$from = $this->_cakeEmail->from();
$this->_smtpSend('MAIL FROM:<' . key($from) . '>');
$to = $this->_cakeEmail->getTo();
$cc = $this->_cakeEmail->getCc();
$bcc = $this->_cakeEmail->getBcc();
$to = $this->_cakeEmail->to();
$cc = $this->_cakeEmail->cc();
$bcc = $this->_cakeEmail->bcc();
$emails = array_merge(array_keys($to), array_keys($cc), array_keys($bcc));
foreach ($emails as $email) {
$this->_smtpSend('RCPT TO:<' . $email . '>');
@ -162,7 +162,7 @@ class SmtpTransport extends AbstractTransport {
$headers = $this->_cakeEmail->getHeaders(array_fill_keys(array('from', 'replyTo', 'readReceipt', 'returnPath', 'to', 'cc', 'bcc', 'subject'), true));
$headers = $this->_headersToString($headers);
$message = implode("\r\n", $this->_cakeEmail->getMessage());
$message = implode("\r\n", $this->_cakeEmail->message());
$this->_smtpSend($headers . "\r\n\r\n" . $message . "\r\n\r\n\r\n.");
}