PHPMailer和SMTP:从远程服务器发送邮件时,邮件从不显示,在本地计算机上也可以正常工作 [英] PHPMailer and SMTP: Mail never shows up when sent from remote server, works fine on local machine

查看:207
本文介绍了PHPMailer和SMTP:从远程服务器发送邮件时,邮件从不显示,在本地计算机上也可以正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用PHPMailer发送电子邮件的脚本.电子邮件通过直接SMTP连接发送到远程邮件服务器.问题是,尽管当我在本地计算机上运行脚本时一切似乎都还可以,但是当脚本使用相同的远程SMTP服务器在我们的实时站点上运行时,电子邮件却永远无法通过.令人好奇的是,它似乎已经在某个时间点工作了,并且最近才决定不再使用它.

I have a script that uses PHPMailer to send out an email. The email is sent with a direct SMTP connection to a remote mail server. The problem is that while everything seems to be okay when I run the script on my local machine, when the script is run on our live site using the same remote SMTP server the email never gets through. What's curious is that it seems to have worked at one point in time and has semi-recently decided that it just wasn't going to work anymore.

有哪些潜在的故障点?我无权访问有问题的SMTP服务器,因此如果不提交支持通知单就无法检查其日志文件,尽管我仅获得了对发送电子邮件的Web服务器的sudo访问权,但是我不确定我正在寻找要通过的日志文件等内容.

What potential points of failure are there? I do not have access to the SMTP server in question so I can't check its log files without submitting a support ticket, and although I was just given sudo access to the web server that is sending the email, I'm not quite sure what I'm looking for in terms of logfiles to go through, etc.

FWIW,我的本地计算机运行的是Ubuntu 8.10,而远程计算机运行的是Red Hat Enterprise Linux ES版本4(Nahant Update 1),因此版本存在一些差异,但是我真正想要的是对于我应该在哪里寻找问题提供了一些建议.

FWIW, my local machine is running Ubuntu 8.10, and the remote machine is running Red Hat Enterprise Linux ES release 4 (Nahant Update 1), so there is a bit of a difference in versions, but all I'm really looking for is a few pointers on where I should be looking for problems.

推荐答案

您如何登录到现场站点,尝试打开到远程SMTP服务器的原始会话,并尝试使用原始SMTP命令发送电子邮件?这样做将有助于缩小问题的可能原因.

How about you log into your live site, try to open a raw session to the remote SMTP server, and attempt to send email using raw SMTP commands? Doing so will help narrow down the possible causes of the problem.

这篇关于PHPMailer和SMTP:从远程服务器发送邮件时,邮件从不显示,在本地计算机上也可以正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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