phpmailer无法从本地主机(XAMPP)运行 [英] Phpmailer not working running from localhost (XAMPP)

查看:81
本文介绍了phpmailer无法从本地主机(XAMPP)运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用在本地主机上运行的phpmailer的发送邮件功能使我感到困扰.

I am being troubled from the send mail function using phpmailer running at localhost.

我使用XAMPP, phpmailer

$mail->IsSMTP()$mail->IsSendmail()在主机上运行良好,但在localhost上运行不正常.

The $mail->IsSMTP() or $mail->IsSendmail() is working well on the hosting, but not localhost.

我尝试了互联网上提到的许多解决方案,例如启用了OPENSSL (extension=php_openssl.dll)

I had tried many solution mentioned on the internet, such as enabled the OPENSSL (extension=php_openssl.dll)

For using $mail->IsSendmail() of phpmailer, it shown "Could not execute: /usr/sbin/sendmail".

For using $mail->IsSMTP() with well configured, all are setting correctly.

它显示

 "SMTP Error: Could not authenticate.", 

我从调试器中获得了信息,其中有信息"...SMTP -> ERROR: Password not accepted from server:..."

I had the info from its debugger, there is info "...SMTP -> ERROR: Password not accepted from server:..."

但是这些在实时托管环境中没有问题,只是在本地主机上不起作用.

But those had no problem on the live hosting environment, just only not work at localhost.

希望有人可以给我一些想法.非常感谢.

Hope someone can give me some idea. Many Thanks.

推荐答案

isSendmail在Windows上不太可能-如果安装了本地邮件服务器,请使用isMail;如果已安装,请确保它已启动并且正在运行(例如telnet localhost 25). isSMTP直接发送,不受本地邮件配置的影响,这就是它为您工作的原因.您还应该阅读故障排除文档.

isSendmail is unlikely to work on Windows - use isMail if you have a local mail server installed, and if you do, make sure it's up and running (e.g. telnet localhost 25). isSMTP sends directly and is unaffected by local mail config, which is why it's working for you. You should also read the troubleshooting docs.

这篇关于phpmailer无法从本地主机(XAMPP)运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆