File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,9 @@ private function _smtp_close() {
492492 public function send ($ recipients ) {
493493 if (!is_array ($ recipients )) $ recipients = array ($ recipients );
494494
495+ if ($ this ->use_smtp == true ) $ this ->_crlf = "\r\n" ;
496+ else $ this ->_crlf = "\n" ;
497+
495498 $ this ->create ();
496499
497500 $ subject = '' ;
@@ -547,10 +550,10 @@ public function send($recipients) {
547550 if ($ recipname && !is_numeric ($ recipname )) $ this ->setHeader ('To ' , $ recipname . ' < ' . $ recip . '> ' );
548551 else $ this ->setHeader ('To ' , $ recip );
549552
550- $ mail_content = 'To: ' . $ this ->getHeader ('To ' ) . $ this ->_crlf ;
553+ $ mail_content = 'Subject: ' . $ enc_subject . $ this ->_crlf ;
554+ $ mail_content .= 'To: ' . $ this ->getHeader ('To ' ) . $ this ->_crlf ;
551555 if ($ this ->getHeader ('Bcc ' ) != '' ) $ mail_content .= 'Bcc: ' . $ this ->_encodeHeader ($ this ->getHeader ('Bcc ' ), $ this ->mail_charset ) . $ this ->_crlf ;
552556 if ($ this ->getHeader ('Cc ' ) != '' ) $ mail_content .= 'Cc: ' . $ this ->_encodeHeader ($ this ->getHeader ('Cc ' ), $ this ->mail_charset ) . $ this ->_crlf ;
553- $ mail_content .= 'Subject: ' . $ enc_subject . $ this ->_crlf ;
554557 $ mail_content .= implode ($ this ->_crlf , $ headers ) . $ this ->_crlf . $ this ->_crlf . $ this ->body ;
555558
556559 fputs ($ this ->_smtp_conn , $ mail_content . $ this ->_crlf . '. ' . $ this ->_crlf );
You can’t perform that action at this time.
0 commit comments