Merge pull request #493 from cdvrooman/2.1

Improved two CakeEmail error messages
This commit is contained in:
José Lorenzo Rodríguez 2012-02-19 08:56:55 -08:00
commit bd5268b941

View file

@ -828,7 +828,7 @@ class CakeEmail {
$this->_messageId = $message; $this->_messageId = $message;
} else { } else {
if (!preg_match('/^\<.+@.+\>$/', $message)) { if (!preg_match('/^\<.+@.+\>$/', $message)) {
throw new SocketException(__d('cake_dev', 'Invalid format to Message-ID. The text should be something like "<uuid@server.com>"')); throw new SocketException(__d('cake_dev', 'Invalid format for Message-ID. The text should be something like "<uuid@server.com>"'));
} }
$this->_messageId = $message; $this->_messageId = $message;
} }
@ -957,7 +957,7 @@ class CakeEmail {
throw new SocketException(__d('cake_dev', 'From is not specified.')); throw new SocketException(__d('cake_dev', 'From is not specified.'));
} }
if (empty($this->_to) && empty($this->_cc) && empty($this->_bcc)) { if (empty($this->_to) && empty($this->_cc) && empty($this->_bcc)) {
throw new SocketException(__d('cake_dev', 'You need specify one destination on to, cc or bcc.')); throw new SocketException(__d('cake_dev', 'You need to specify at least one destination for to, cc or bcc.'));
} }
if (is_array($content)) { if (is_array($content)) {