I have used mailgun smtp to sending emails from my codeignitor app I am getting following error while sending email
A PHP Error was encountered
Severity: Warning
Message:
fsockopen()
[function.fsockopen]
: unable to connect tosmtp.mailgun.org:587
(Connection timed out)
PORT 25,465,587
are open/unblocked on server
allow_url_fopen
is on
in php.ini
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.
:)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.