让phpmailer支持中文名称的附件

Tuesday, May 23rd, 2006

phpmailer设置使用utf-8编码发送邮件以后,已经能够正常的发送中文邮件了,当然你调用时传进去的中文参数必须也是utf-8编码才行,但是我发现,即使这样,发送中文文件名的附件的时候,附件名称不能正确的显示。 比如我们要发送的附件是“测试.txt”,如果在添加附件的时候强制使用指定文件名的方式:

$mail->AddAttachment($attach, $attach);

......[阅读全文]

Tags: , , , , ,

终于能够通过phpmailer使用gmail账号发送邮件了

Friday, April 14th, 2006

phpmailer(现在的版本是1.73)是一个很好用的工具,可以很方便的使用php语言发送邮件,支持smtp及验证,我们一直都用它。 但是,由于gmail的smtp采用了ssl连接:

Outgoing Mail (SMTP) Server - requires TLS: smtp.gmail.com (use authentication)

......[阅读全文]

Tags: , , , , ,