2013-08-24 22:19
浏览 38


I have scoured every tutorial out there on how to do this and I am still not getting the desired result so there must be some detail I am missing. The mail() function returns as though it succeeded however I NEVER GET ANY EMAILS in my sent or inbox

In a nutshell I have done the following:

  1. Copied Sendmail.exe and Sendmail.ini along with their dlls to a
    folder named Sendmail that resides in c:\program files\wamp\bin\

  2. Edited the sendmail.ini to point to port 465 (for gmail) and smtp to, also configured the correct user name and password
    authentication fields, as well as set smtp_ssl to ssl

  3. Enabled the php_openssl and php_sockets under php extensions in wamp

  4. edited php.ini [mail function] parameters. I commented out everything in win32 and then set smtp_path = c:\program files\wamp\bin\sendmail\sendmail.exe -t" then restarted all serviced on WAMP

  5. Logged into my gmail account and enabled IMAP

Can anyone please help me out here???

图片转代码服务由CSDN问答提供 功能建议

我已经在每个教程中搜索了如何做到这一点,我仍然没有得到理想的结果所以必须 我缺少一些细节。 mail()函数返回就好像它成功但我从来没有在我的发送或收件箱中获取任何电子邮件


  1. 将Sendmail.exe和Sendmail.ini及其dll复制到名为Sendmail的
    文件夹中,该文件位于c:\ program files \ wamp \ bin中 \

  2. 编辑sendmail.ini指向端口465(对于gmail)和smtp指向,还配置了正确的用户名和密码< br> authentication字段,以及将smtp_ssl设置为ssl

  3. 在wamp的php扩展下启用php_openssl和php_sockets < li>

    编辑了php.ini [mail function]参​​数。 我在win32中注释了所有内容,然后设置了smtp_path = c:\ program files \ wamp \ bin \ sendmail \ sendmail.exe -t“然后重新启动了所有在WAMP上提供的服务

  4. 登录我的Gmail帐户并启用IMAP


  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • doufan9290 2013-09-27 12:36

    This is from :

    I followed the steps and was able to send emails from wamp server. Your problem seems to be the name of the folder "Program Files" it has a space in it.

    If the path to the sendmail.exe contains “space” (for example, “C:\Program Files\PHP\sendmail\”) then Apache would not be able to locate it. So, either store the sendmail.exe at a “non-spaced” location/path OR write the path in DOS style “C:\Progra~1\PHP\sendmail\” in the php.ini (sendmail_path = "C:\Progra~1\PHP\sendmail\sendmail.exe -t -i").

    解决 无用
    打赏 举报
  • duanfu3884 2013-08-24 22:39

    Have a look at >


    It's a lot easier and it saves a lot of time to send using frameworks rather than attempting to tinker wamp on your own.

    (on a side note, it's MUCH easier to send gmail via smtp with python)

    Good luck!

    解决 无用
    打赏 举报

相关推荐 更多相似问题