The Server Is Not Configured Please Try Again Later Cannot Connect to Server
These days, an pick to send mails is a basic requirement of whatever web awarding.
Then popular applications like WordPress, Drupal etc. include a mail plan called "PHPMailer" for sending mails.
The steps to setup PHPMailer may non exist intuitive to many website owners and mistakes in configuration oft crusade " Smtp error: Failed to connect to server " error.
Equally part of our Support Services, nosotros assist website owners solve their technical issues. And, mail issue related with PHPMailer is an error that we see often .
In this commodity, we'll see the top reasons for "Smtp fault: Failed to connect" and how we fix them.
What is "Smtp error: Failed to connect to server" ?
Spammers often use php scripts that directly connect to remote servers and send spam mails.
To defend this, many Web Hosting providers block direct connectedness from websites to external mail servers.
In such servers, mails from website can be sent just via its own mail service server (SMTP server) port, just every bit how Outlook or Windows Mail works.
PHPMailer is a mail application that works similar a mail client and helps to send postal service via SMTP server.
But, PHPMailer do not work out of the box. It tin can neglect due to firewall restrictions on the server, wrong mail server proper noun, port etc. and shows the fault:
"Smtp error: Failed to connect to server"
And, depending on the response from the mail server, we've seen two variations of this mistake :
SMTP ERROR: Failed to connect to server: Connection refused (111)
or
SMTP Error: Failed to connect to server: Connection timed out (110)
What causes SMTP ERROR: Failed to connect to server ?
Hither, allow united states discuss the superlative reasons for "SMTP ERROR: Failed to connect to server".
1. SMTP restrictions on the server.
Servers restrict the programs that tin can directly connect to remote servers and send post. Usually, simply mail server, root user etc. permit SMTP connections.
For case, CPanel servers block access to external SMTP servers using the " SMTP Restrictions " option.
With this restriction, connection from PHPMailer to an external mail server exercise not work. The connectedness wait for some time and somewhen die with the following mistake:
2018-x-12 04:12:37 SMTP Mistake: Failed to connect to server: Connexion timed out (110) SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Oops! Something went wrong and we couldn't send your bulletin.Mailer Mistake: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
2. Firewall restrictions on the server
Mail servers take or reject connections based on certain firewall policies.
All post servers let the connection from default mail port 25. Bu,t other mail ports like 465, 587 etc. will not be open up in many servers.
On a server with post port restrictions, when a website owner tries to send postal service using an external smtp server on port 465, it ends up in error:
2018-08-28 10:33:12 Connection: Failed to connect to server. Mistake number 2. "Error detect: stream_socket_client(): unable to connect to ssl://mail.xyz.com:465 (Connection refused) 2018-08-28 ten:33:12 SMTP ERROR: Failed to connect to server: Connection refused (111)
Hither, this "Connexion Refused" error means that sending mail server refuses outbound connections on port 465 and is non able to connect to remote mail service server.
iii. Incorrect settings in PHPMailer
This SMTP error tin can also happen if the post server name is incorrectly ready (with additional white space) in PHPMailer configuration. Then, web form tries to connect to an invalid proper noun and fails.
iv. DNS failures
For the PHPMailer to piece of work properly, the mail server specified in its configuration should have proper dns records. When dns do non work on the server, a look up from the server shows wrong IP address or no IP accost for the postal service server. Over again, that causes post to fail with SMTP error.
How to set up SMTP Error: Failed to connect to server
For mails to work with PHPMailer, both sending and receiving server has to accept connections.
Our Support Engineers primarily checks the connection betwixt postal service servers and find whether it is an incoming or approachable block.
And so, to fix the mail error, we brand changes on the server that includes the following :
- Change the firewall rules on the server to allow outbound connections on ports like 465.
- Alter the SMTP restrictions on the server. And then, add particular website user to the list of users who can make outbound SMTP connections.
- Edit PHPMailer settings similar Host, Port etc.
- Correct DNS resolution for mail server.
Decision
"SMTP Fault: Failed to connect to server" mainly happens considering of mail service server connectivity bug, wrong port settings etc. Here, we have discussed the causes that our Support Engineers often see in servers and how we fix them.
Prevent YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us aid you lot.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
GET STARTED
var google_conversion_label = "owonCMyG5nEQ0aD71QM";
Source: https://bobcares.com/blog/smtp-error-failed-to-connect-to-server/
0 Response to "The Server Is Not Configured Please Try Again Later Cannot Connect to Server"
Post a Comment