Permalink
Browse files

Fixed sending BCC with DATA for CakeEmail, as well as 7->8bit convers…

…ion tests passing
  • Loading branch information...
1 parent f8697cc commit 2844f4a477d3e8eea9efb1696723671fb41cefdc @predominant predominant committed Oct 22, 2011
@@ -165,7 +165,7 @@ protected function _sendRcpt() {
protected function _sendData() {
$this->_smtpSend('DATA', '354');
- $headers = $this->_cakeEmail->getHeaders(array('from', 'sender', 'replyTo', 'readReceipt', 'returnPath', 'to', 'cc', 'bcc', 'subject'));
+ $headers = $this->_cakeEmail->getHeaders(array('from', 'sender', 'replyTo', 'readReceipt', 'returnPath', 'to', 'cc', 'subject'));
$headers = $this->_headersToString($headers);
$message = implode("\r\n", $this->_cakeEmail->message());
$this->_smtpSend($headers . "\r\n\r\n" . $message . "\r\n\r\n\r\n.");
@@ -224,14 +224,14 @@ public function testSendData() {
$data = "From: CakePHP Test <noreply@cakephp.org>\r\n";
$data .= "To: CakePHP <cake@cakephp.org>\r\n";
$data .= "Cc: Mark Story <mark@cakephp.org>, Juan Basso <juan@cakephp.org>\r\n";
- $data .= "Bcc: phpnut@cakephp.org\r\n";
+ //$data .= "Bcc: phpnut@cakephp.org\r\n";
@markstory

markstory Oct 22, 2011

Owner

Why not just remove the line?

@ceeram

ceeram Oct 22, 2011

Member

it is in next commit

@predominant

predominant Oct 22, 2011

Contributor

Its my friend.

$data .= "X-Mailer: CakePHP Email\r\n";
$data .= "Date: " . date(DATE_RFC2822) . "\r\n";
$data .= "Message-ID: <4d9946cf-0a44-4907-88fe-1d0ccbdd56cb@localhost>\r\n";
$data .= "Subject: Testing SMTP\r\n";
$data .= "MIME-Version: 1.0\r\n";
$data .= "Content-Type: text/plain; charset=UTF-8\r\n";
- $data .= "Content-Transfer-Encoding: 7bit\r\n";
+ $data .= "Content-Transfer-Encoding: 8bit\r\n";
$data .= "\r\n";
$data .= "First Line\r\n";
$data .= "Second Line\r\n";

0 comments on commit 2844f4a

Please sign in to comment.