Browse Source

Fixed sending BCC with DATA for CakeEmail, as well as 7->8bit conversion tests passing

Graham Weldon 14 years ago
parent
commit
2844f4a477

+ 1 - 1
lib/Cake/Network/Email/SmtpTransport.php

@@ -165,7 +165,7 @@ class SmtpTransport extends AbstractTransport {
 	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.");

+ 2 - 2
lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php

@@ -224,14 +224,14 @@ class SmtpTransportTest extends CakeTestCase {
 		$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";
 		$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";