Php 如何使用xmapp和wordpress在本地主机上发送邮件
我已经在我的系统上安装了Php 如何使用xmapp和wordpress在本地主机上发送邮件,php,xampp,sendmail.exe,Php,Xampp,Sendmail.exe,我已经在我的系统上安装了xmapp,我正在使用WordPress作为我的站点。现在在WordPress中,我使用了联系人表格7来发送邮件,当我从该表格发送邮件时,它会给我错误信息,即与您的系统管理员联系 为此,我使用了wp mailSMTP,并正确配置了站点 在我的sendmail.ini中,我设置了以下内容: smtp_server=pop.gmail.com smtp_port=587 smtp_ssl=TLS ;default_domain=localhost aut
xmapp
,我正在使用WordPress作为我的站点。现在在WordPress中,我使用了联系人表格7来发送邮件,当我从该表格发送邮件时,它会给我错误信息,即与您的系统管理员联系
为此,我使用了wp mailSMTP
,并正确配置了站点
在我的sendmail.ini
中,我设置了以下内容:
smtp_server=pop.gmail.com
smtp_port=587
smtp_ssl=TLS
;default_domain=localhost
auth_username= noreply@bllsoft.com
auth_password= -------
hostname=localhost
;SMTP =
;smtp_port = 25
; sendmail_from = noreply@bllsoft.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t -i"
在我的php.ini文件中,我设置了以下内容:
smtp_server=pop.gmail.com
smtp_port=587
smtp_ssl=TLS
;default_domain=localhost
auth_username= noreply@bllsoft.com
auth_password= -------
hostname=localhost
;SMTP =
;smtp_port = 25
; sendmail_from = noreply@bllsoft.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t -i"
我所要做的就是修复它,但没有得到我想要的结果
在wamp中,我做了相同的设置,能够正确地从本地主机发送邮件,我对此感到满意
有时在xampp中,邮件发送消息会出现,但我的收件箱中没有收到邮件,在这种情况下,有人能帮我吗
提前非常感谢。如果您想使用wordpress从本地主机发送邮件,并且希望使用您的gmail帐户发送邮件,那么您可以使用gmail SMTP邮件服务器 为了简化这件事,你可以使用这个插件 转到其设置页面(设置下的电子邮件子菜单)并选择以下选项:
Mailer: send all wordpress emails via SMTP
SMTP Options:
SMTP Host:smtp.gmail.com
SMTP Port:465
Encryption: Yes, use SMTP authentication
Username: **yourfullemail**@gmail.com
Password: **yourgmailpassword**
在
sendmail.ini
下,尝试将smtp\u server=pop.gmail.com
更改为smtp\u server=smtp.gmail.com
步骤1
在php.ini文件中,通常在“C:\xampp\php”上找到
编辑[邮件功能]
[mail function]
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = youremail@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
步骤2
在sendmail.ini文件中,通常在“C:\xampp\sendmail”上找到
编辑[发送邮件]
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=youremail@gmail.com
auth_password=yourpassword
步骤3
重新启动Apache
步骤4
在你的gmail帐户上
我的帐户>登录和安全
打开“允许不太安全的应用程序”这是我的代码片段,基于您需要先安装然后配置它,只需将下一个代码片段添加到您的
函数中即可。php
请注意,如果包含“test”或“local”,则需要“配置您的规则”来检查默认情况下是否打开本地规则将常量
'WP_HOME'
测试到WP config.php
中,如果包含“test”或“local”,则需要在代码段中指定您自己的角色规则函数它是isLocal()
@Daya,这是完全错误的。PHP的邮件
,有很多地方都有问题,但这不是其中之一。您的配置正试图将pop.gmail.com
用作SMTP服务器。你是不是应该使用smtp.gmail.com?@Charles:我尝试了很多次,但一次又一次失败,因为即使它与wamp配合得很好,我也不知道xampp会发生什么。你解决这个问题的任何专家都可能重复?????