window 配置 sendmail

时间:2023-03-08 16:26:46
window 配置 sendmail
  1. http://glob.com.au/sendmail/下载sendmail.zip

  2. 解压sendmail.zip到目录下(最好使用短路径,长路径会导致问题的出现),我安装的路径是: E:\wamp\sendmail

3.修改php.ini 配置,我是使用的QQ邮箱发送邮件。配置如下图所示: 
window 配置 sendmail

4.修改 sendmail.ini,文件路径:E:\wamp\sendmail\sendmail.ini

  1. smtp_server=smtp.qq.com
  2. smtp_port=25
  3. auth_username= yourusername //123456789@qq.com
  4. auth_password=yourpassword // 腾讯邮箱授权第三方登录授权码,非QQ密码
  5. force_sender= yourusername // 和auth_username 必须一样,不然禁止发送

下面这两项最好开启,方便查看那里出问题了

    1. ; log smtp errors to error.log (defaults to same directory as sendmail.exe)
    2. ; uncomment to enable logging
    3. error_logfile=error.log
    4. ; create debug log as debug.log (defaults to same directory as sendmail.exe)
    5. ; uncomment to enable debugging
    6. debug_logfile=debug.log