无法使用xampp通过localhost wordpress发送电子邮件

时间:2015-07-16 10:39:17

标签: php wordpress smtp xampp localhost

我尝试了所有解决方案,在stackoverflow查看了每个答案,但没有任何效果。这是我的sendmail.ini文件设置

smtp_server=smtp.gmail.com
smtp_port=465
smtp_ssl=auto
auth_username=myemail@gmail.com
auth_password=password
pop3_server=
pop3_username=
pop3_password=
force_sender=myemail@gmail.com
force_recipient=
hostname=localhost

和我的php.ini档案

[mail function]
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
 SMTP = smtp.gmail.com
 smtp_port = 465

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = sinc964@gmail.com

; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesC:\xampp) fakemail and mailtodisk do not work correctly.
; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.  
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the C:\xampp\mailoutput folder
;sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"

当我尝试使用contact-form-7插件发送消息时,sendmail.exe弹出并停留在那里,此动画继续盘旋link
我浪费了一半的时间只是解决这个问题的一天,任何帮助都会很棒。

更新
我正在使用smtp4dev软件通过localhost接收已发送的电子邮件,但是谷歌或雅虎都没有收到电子邮件。

3 个答案:

答案 0 :(得分:0)

下载并安装SMTP4Dev,它会监听e-mails上发送的localhost

同时尝试使用与gmailSending With Gmail Doesn’t Work… What To Do?不同的域。

答案 1 :(得分:0)

使用Phpmailer从Localhost发送邮件

答案 2 :(得分:0)

请尝试此插件,您的问题将会缩短:wordpress mail SMTP

https://wordpress.org/plugins/wp-mail-smtp/

如果您对设置有疑问,请告诉我..

相关问题