1
votes

Mandrill SMTP - API 110 : Connection timed out ERROR with PHPMailer

ERROR

SMTP -> ERROR: Failed to connect to server: Connection timed out (110) SMTP Error: Could not connect to SMTP host. SMTP -> ERROR: Failed to connect to server: Connection timed out (110) SMTP Error: Could not connect to SMTP host.

Sample Code

<?php
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPDebug = 1;   // enables SMTP debug information (for testing)
$mail->SMTPAuth = true;                  // enable SMTP authentication
$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
$mail->Host = "smtp.mandrillapp.com";     // sets GMAIL as the SMTP server
$mail->Port = 465;                   // set the SMTP port for the GMAIL server
$mail->Username = “yourusername”;  // GMAIL username
$mail->Password = “passowrd”;            // GMAIL password
?>
1

1 Answers

0
votes

We are on the same ground. So, first is to review your configuration:

  1. $mail->SMTPSecure = "ssl"; // sets the prefix to the servier

Are you using any secure line? If not, you can delete this one.

  1. $mail->Port = 465; // set the SMTP port for the GMAIL server

You should check that the port you are using is really the port that is intended to be used. More information about Mandrill ports here.

If the above still doesn't solve the problem then check and contact your web hosting provider if they allows outbound SMTP connections especially to Mandrill, because some provider only do so on dedicated servers. More information here: http://help.mandrill.com/entries/24633717-Why-am-I-getting-a-Relay-Access-Denied-error-trying-to-send-through-SMTP-