dongqi1245 2016-06-02 16:22
浏览 88
已采纳

无法从服务器B上的服务器A + Exim上的phpmailer发送邮件

I have a website hosted on server A. I use Cloudflare services, so I can not send mails to my users from the same server. I have server B for mail sending. Installed Exim and configured it as follows:

internet site, mail is sent and received directly using SMTP
Machines to relay mail for: [IP address of the server A]

On serevr A I use Phpmailer to send mail:

$mail->IsSMTP();
$mail->SMTPAuth   = false;
$mail->SMTPSecure = "";
$mail->Host       = "IP address of server B";
$mail->Port       = 25;
$mail->Username   = "";
$mail->Password   = "";

Unfortunately, it doe snot work. Tried to change $mail->SMTPAuth to "true" but it does not help.

SMTP Error: Could not connect to SMTP host.
  • 写回答

1条回答 默认 最新

  • duandaotuo5542 2016-06-02 17:14
    关注

    You've not posted much info to go on, but it's likely that outbound traffic to port 25 is blocked - see if you can telnet serverb 25 from server A. Normally you can't send out (relay) through port 25 anyway, but use an external authenticated submission host on port 587 instead. You should try reading the troubleshooting guide which covers all kinds of connection issues.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容