php - 在 cPanel 中通过 Sendgrid 发送电子邮件

标签 php linux email cpanel exim

我在 Google Cloud Compute 中有一个虚拟机,我正尝试从中发送电子邮件。 Google doesn't allow通过端口 25 和 465 的传出连接。我在 VM 中安装了 cPanel,现在我正在尝试将其设置为通过 Sendgrid 发送电子邮件。

在 SendGrid 的网站上有关于如何执行此操作的详细文档,但在逐步按照说明进行操作后,电子邮件仍然无法发送。

这是/var/logs/exim_main 的一个片段:

2016-03-03 19:22:21 cwd=/ 2 args: /usr/sbin/exim -q
2016-03-03 19:22:21 Start queue run: pid=25773
2016-03-03 19:23:24 1abTCN-0003j0-Is H=smtp.sendgrid.net [158.85.10.138] Connection timed out
2016-03-03 19:23:34 SMTP connection from [127.0.0.1]:47219 (TCP/IP connection count = 1)
2016-03-03 19:23:35 SMTP connection from (localhost) [127.0.0.1]:47219 closed by QUIT
2016-03-03 19:24:27 1abTCN-0003j0-Is H=smtp.sendgrid.net [108.168.190.108] Connection timed out
2016-03-03 19:24:27 1abTCN-0003j0-Is == example@gmail.com R=send_via_sendgrid T=sendgrid_smtp defer (110): Connection timed out
2016-03-03 19:24:27 1abPZb-0000qa-33 Message is frozen
2016-03-03 19:24:27 End queue run: pid=25773

如有任何帮助,我们将不胜感激。提前致谢

最佳答案

我可以看到您无法连接 sendgrid 服务器来发送邮件。请检查您的服务器与 sendgrid 服务器的连接

2016-03-03 19:24:27 1abTCN-0003j0-Is H=smtp.sendgrid.net [108.168.190.108] Connection timed out

https://support.sendgrid.com/hc/en-us/articles/200182038-Testing-your-connectivity-to-Sendgrid-s-SMTP-relay-using-Telnet

关于php - 在 cPanel 中通过 Sendgrid 发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35791350/

相关文章:

php - 如何在 WordPress 中将菜单位置添加为管理仪表板菜单

c - 尝试编写计算指定文件中字节数的程序(C语言)

email - BlackBerry 查找电子邮件地址

android - 是否可以通过 Android 电子邮件客户端中的视口(viewport)调整图像大小?

php - 从 MySQL 中选择(日期)

php 时间没有给出正确的日期

javascript - 第二个 JQuery POST 未定义值

php - XAMPP - 如何从主目录执行 PHP 文件?

linux - 我想检查第一列中的数字是否等于第二列,第一列应以以下格式开始和结束

ios - 按下邮件编辑器中的发送按钮后应用程序崩溃