Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

Discussion in 'E-mail Discussion' started by iToke, Jul 14, 2011.

  1. iToke

    iToke Active Member

    Joined:
    Sep 23, 2010
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    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   "info@showcase-music.com"// 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
     

    Attached Files:

  2. iToke

    iToke Active Member

    Joined:
    Sep 23, 2010
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    56
    managed to resolve this issue by setting $mail->host to localhost.
     
  3. nirmaldaniel

    nirmaldaniel Registered

    Joined:
    May 9, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Website Owner
    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
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice