php 使用sendmail发送邮件
1.配置php.ini
SMTP=smtp.163.com
sendmail_from = [email protected]
sendmail_path = "C:/xampp/sendmail/sendmail.exe -t"
2.配置sendmail.ini
smtp_server=smtp.163.com
[email protected]
auth_password=sqm100
3.测试
<?php
if (mail("[email protected]", "测试", "测试邮件")) {
echo 'success!';
} else {
echo 'fail';
}