Home Features Pricing Support Contact
Search:     Advanced search

SMTP Error: Could not connect to SMTP host

Article ID: 338
Last updated: 25 Apr, 2012

Error message/code:

SMTP Error: Could not connect to SMTP host

Description:

Script can't connect to SMTP server

Solution:

1. Make sure SMTP credential are correct.

2. If you on Linux check to see if SELinux is preventing the connection

[root@webserver ~]# sestatus -b | grep sendmail

If the result is httpd_can_sendmail off ... SELinux is preventing the connection. Allow it by:

setsebool httpd_can_sendmail=1

...and check again to make sure the change was applied:

[root@webserver ~]# sestatus -b | grep sendmail

The result should be

httpd_can_sendmail on

Restart Apache

Article ID: 338
Last updated: 25 Apr, 2012
Revision: 1
Views: 4264
Comments: 0
Print Export to PDF Subscribe Share Add comment
This article was:   Helpful | Not helpful
Prev   Next
Warning: date(): It is not safe to rely on the system's timezone...     Fatal error: require_once()...common.inc.php...