0
我必須把一些attchments與chunk_splits所以我必須用簡單的郵件功能不能使用其他像PHPMailer的,swiftMAILER,發送郵件使用PHP,XAMPP mail()函數在本地主機上的SMTP GMAIL
我當前設置的php.ini
SMTP=smtp.gmail.com
smtp_port=587
[email protected]
sendmail_path = "\"D:\xampp\sendmail\sendmail.exe\" -t"
SENDMIAL設置
smtp_port=587
smtp_ssl=tls
[email protected]
auth_password=xyz
是設置正確的...我能夠通過YiiMail擴展送..但監守的一些附件IH AVE添加這樣..我不能與做..
郵件我必須這樣做,所以我不能使用其他像SWIFT/PHP MAILER
$ PDF是TCPDF目標i我在旅途中不保存在本地磁盤
$_SESSION['pdf'] = $pdf->Output("order_receipt.pdf", "S");
$attachment[0] = chunk_split(base64_encode($_SESSION['pdf']));
$headers .= "--" . $separator . $eol;
$headers .= "Content-Type: application/octet-stream; name=\"" . $lable[0] . "\"" . $eol;
$headers .= "Content-Transfer-Encoding: base64" . $eol;
$headers .= "Content-Disposition: attachment" . $eol . $eol;
$headers .= $attachment[0] . $eol . $eol;
我必須添加不在磁盤上的文件...我必須附加從TCPDF生成的pdf文件...所以我沒有將該文件保存到我的磁盤...在剛纔將其添加爲base64數據 – 2014-11-01 10:54:03
我更新了我的問題 – 2014-11-01 11:00:03