2

I am using smtp by mandrill on my website through PHPMailer. I have configured everything correctly. Here are the configurations-

$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host       = "smtp.mandrillapp.com"; // SMTP server
$mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
                                           // 1 = errors and messages
                                           // 2 = messages only
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->Host       = "smtp.mandrillapp.com"; // sets the SMTP server
$mail->Port       = 587;                    // set the SMTP port for the GMAIL server
$mail->Username   = "MANDRILL_USERNAME"; // SMTP account username
$mail->Password   = "MANDRILL_KEY";

When I send email, it gives an error SMTP -> ERROR: Failed to connect to server: Connection refused (111)

I am using godaddy shared hosting plan. Please help.

1 Answers1

2

Some shared hosting providers block all outbound SMTP connections or common SMTP ports. You'll need to contact GoDaddy to confirm whether you're on a plan that supports outbound SMTP connections (you'll typically need a higher-level or VPS plan to support this with most shared hosts).

Kaitlin
  • 6,167
  • 32
  • 30