The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

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

  1. iToke

    iToke Active Member

    Joined:
    Sep 23, 2010
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    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:
    6
    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:
    1
    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