里边的PHPMailer死活打不开,找到了个git地址,比较好用,记录一下。
https://github.com/PHPMailer/PHPMailer另外补充一下官方的邮件发送:1.邮件发送需要三个文件class.smtp.php,PHPMailerAutoload.php,class.phpmailer.php。我做的时候把这仨文件全放到项目工具包里了用import引入的class.phpmailer.php,名字改成phpmailer.class.php了。
2.邮件发送如果出现成功但没收到文件,可能是php.ini里面的php_openssl.dll扩展没开。在官方提供的think_send_mail函数里面有个调试,打开就知道为啥发送成功但收不到的问题了。
$mail->SMTPDebug = 1; // 关闭SMTP调试功能 最佳答案