開啟ssl功能
- 找到php.ini(http://localhost/phpinfo.php)
- 取消註解 extension=php_openssl.dll
基本格式
另一種附加檔案寫法(可重新命名檔名)
- $mail->AddAttachment("upload/temp/filename.zip", "newname.zip");
中文亂碼問題
- $mail->CharSet = "utf8";
中文附檔名問題
- 打開class.phpmailer.php
- //filename = basename($path);
- 加入
if (false === strpos($path, ‘/’))
$filename = $this->EncodeHeader($path);
else
$filename = $this->EncodeHeader(substr($path, strrpos($path, ‘/’) + 1));
參考:
- http://my-web-design.blogspot.tw/2007/10/phpmailer.html
- http://belleaya.pixnet.net/blog/post/27410978-%5B%E6%95%99%E5%AD%B8%5D-php-%E5%88%A9%E7%94%A8-phpmailer-%E9%80%8F%E9%81%8E-gmail-%E5%AF%84%E4%BF%A1
- http://www.fwolf.com/blog/post/176



沒有留言:
張貼留言