SMTP -> ERROR: Failed to connect to server: Connection refused (111)

iToke

Active Member
Sep 23, 2010
40
0
56
I am having problems using PHP mailer to send emails via a websites contact form, the following error is shown - SMTP -> ERROR: Failed to connect to server: Connection refused (111)

PHP mailer settings -
PHP:
$mail->Host       = "mail.showcase-music.com"; // SMTP server
  $mail->SMTPDebug  = 1;                     // enables SMTP debug information (for testing)
  $mail->SMTPAuth   = true;                  // enable SMTP authentication
  $mail->Host       = "mail.showcase-music.com"; // sets the SMTP server
  $mail->Port       = 25;                    // set the SMTP port for the GMAIL server
  $mail->Username   = "[email protected]"; // SMTP account username
  $mail->Password   = "*******";        // SMTP account password
I can send and receive emails using Outlook without issue.

I've tried using cPanels Trace email route and it gives me the following -
Mail Routing Error
Filter/Alias File
SMTP Destination
Local Mailbox

the email routing is auto detected as local

I've attached a screen shot of the website's DNS settings.

Any help would be much appreciated.
Thanks
 

Attachments

nirmaldaniel

Registered
May 9, 2012
1
0
51
cPanel Access Level
Website Owner
managed to resolve this issue by setting $mail->host to localhost.
Hi,

Thanks a LOT !! THIS helped me to get my issue resolved

Really I appreciate you in the way you have conducted yourself - after getting the issue resolved usually people tend to forget the post they made. You took time to post on how you got it resolved :) Keep up the good work.

Many Thanks,
Nirmal Daniel