dongxuxian1123 2015-03-04 01:10
浏览 83

如何使用gmail SMTP从IIS PHP发送电子邮件?

How can I use IIS6 PHP with gmail smtp. I am running windows 7.

My php.ini file has on the bottom

SMTP = smtp.gmail.com
smtp_port = 25
auth_username = [username]
auth_password = [password]
sendmail_from = [username]@gmail.com

When I try it in php, I get the error:


Warning: mail(): Failed to connect to mailserver at "smtp.gmail.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Users\Me\Desktop\App\App\script\config\common.php on line 60

Right now, the server is on my home wifi network (router, modem). However if I connect my server to my LTE phone data plan, then it works fine.

Does anyone know what the problem is? Maybe a firewall thing?

Thanks

  • 写回答

1条回答 默认 最新

  • donoworuq450547191 2015-03-04 01:15
    关注

    In this particular circumstance, I suspect your LTE provider is firewalling port 25.

    Gmail does have some alternative ways to send mail that might work. Take a look here and see if any of these scenarios will meet your needs. https://support.google.com/a/answer/176600?hl=en

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作