drvvvuyia15070493 2014-07-07 12:14
浏览 50

如何修改xampp使用PHP发送邮件?

this is my code for sending mail through xampp i have modified the php.ini and sendmail.ini from the xampp . Upon running the php i'm not getting email. Please help me .

php.ini

[mail function]

 SMTP =smtp.gmail.com <br>
 smtp_port =587

; For Win32 only.

 ;sendmail_from =email@gmail.com

sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

sendmail.ini

smtp_server=smtp.gmail.com

; smtp port (normally 25)

smtp_port=587

auth_username=email@gmail.com <br>
auth_password=password <br>
force_sender=email@gmail.com

The php code used for sending email is this

mail("garvit.j742@gmail.com","subject","this is the mail","From:     email@gmail.com");


this is my code for php. Tell me the errors ??

  • 写回答

1条回答 默认 最新

  • duanjumie8753 2017-07-02 15:13
    关注

    I got this error today too. I found this working solution in SO. Just change sendmail.exe file's compatibility mode to Windows XP SP 3.

    1. Right click sendmail.exe and goto properties
    2. change compatibility mode to Windows XP SP 3

    You can find Original post here

    评论

报告相同问题?

悬赏问题

  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了
  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题
  • ¥20 易康econgnition精度验证
  • ¥15 msix packaging tool打包问题
  • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能