无法使用mailgun SMTP在我的codeigniter应用程序中发送电子邮件

时间:2021-08-15 18:14:58

I have used mailgun smtp to sending emails from my codeignitor app I am getting following error while sending email

我使用mailgun smtp从我的codeignitor应用程序发送电子邮件我在发送电子邮件时遇到以下错误

A PHP Error was encountered

遇到PHP错误

Severity: Warning

Message: fsockopen() [function.fsockopen]: unable to connect to smtp.mailgun.org:587 (Connection timed out)

消息:fsockopen()[function.fsockopen]:无法连接到smtp.mailgun.org:587(连接超时)

PORT 25,465,587 are open/unblocked on server

端口25,465,587在服务器上打开/解锁

allow_url_fopen is on in php.ini

allow_url_fopen在php.ini中打开

1 个解决方案

#1


Check if your CI app web host/server allows sending email. Sometimes web hosts don't allow sending emails in default to avoid using them as an email spam server. SMTP port might be blocked. I think you can change it I just don't know where. Try contacting your service provider ask them if they allow sending emails using smtp.

检查CI应用程序Web主机/服务器是否允许发送电子邮件。有时,Web主机不允许默认发送电子邮件,以避免将其用作电子邮件垃圾邮件服务器。 SMTP端口可能被阻止。我想你可以改变它我只是不知道在哪里。尝试联系您的服务提供商,询问他们是否允许使用smtp发送电子邮件。

:)

#1


Check if your CI app web host/server allows sending email. Sometimes web hosts don't allow sending emails in default to avoid using them as an email spam server. SMTP port might be blocked. I think you can change it I just don't know where. Try contacting your service provider ask them if they allow sending emails using smtp.

检查CI应用程序Web主机/服务器是否允许发送电子邮件。有时,Web主机不允许默认发送电子邮件,以避免将其用作电子邮件垃圾邮件服务器。 SMTP端口可能被阻止。我想你可以改变它我只是不知道在哪里。尝试联系您的服务提供商,询问他们是否允许使用smtp发送电子邮件。

:)