PHPMailer SMTP Connection Failed - GoDaddy

how to install phpmailer on godaddy
godaddy smtp settings
smtp error in phpmailer
phpmailer smtp connect() failed
smtp error: failed to connect to server: connection refused (111 godaddy)
godaddy smtp host
smtp connect() failed phpmailer gmail
smtp connect() failed https github com phpmailer/phpmailer wiki troubleshooting

I am working on a website, and in it there is a form that is used to send email through gmail with PHPMailer.

I have it all set up correctly, because it works on my AWS EC2 server. However, when I use the exact same setup on a GoDaddy hosting plan, it doesn't work (yes, I changed 'require' paths).

I am getting this error:

Mailer Error: SMTP connect() failed.

Here is my code:

$mail = new PHPMailer;

$mail->SMTPDebug = 0;

$mail->isSMTP();
$mail->Host = "smtp.gmail.com";
$mail->SMTPAuth = true;
$mail->Username = "**********@gmail.com";
$mail->Password = "*************";
$mail->SMTPSecure = "tls";
$mail->Port = 587;

$mail->setFrom("**********@gmail.com", "Red's Mailer");
$mail->addAddress("*********@shaw.ca", "Name");

$mail->isHTML = true;

$mail->Subject = "New Submission From " . $name;
$mail->Body = $html_msg;
$mail->AltBody = $alt_msg;

Any ideas on the problem?

GoDaddy mail server does not support any email containing "FROM" header entry of aol, gmail, hotmail, yahoo, live, aim or msn.

If you are using linux cPanel hosting plan then you do need to change few lines in your php code and it will work!

$mail = new PHPMailer;
$mail->SMTPDebug = 0;
$mail->isSMTP();
$mail->Host = 'localhost';
$mail->Port = 25;
$mail->ssl = false;
$mail->authentication = false;
$mail->addAddress("*********@shaw.ca", "Name");
$mail->isHTML = true;
$mail->Subject = "New Submission From " . $name;
$mail->Body = $html_msg;
$mail->AltBody = $alt_msg;

Solved: PHPMailer smtp error connection refused, Solved: I created an email script using phpmailer smtp and receiving this error: 2017-11-08 14:56:42 Connection: opening to. PHPMailer SMTP Connection Failed - GoDaddy. Ask Question Asked 3 years, 6 months ago. Active 1 year, 4 months ago. Viewed 6k times 0. I am working on a website, and

I had similar issues. GoDaddy does not allow SMTP outside using the emails with your domain. If you contact support your should get the same answer.

Solved: Can't Get GoDaddy Hosting and PHPMailer to work , Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki​/Troubleshooting. Note: new to the Coding Industry as well as Email Serverside  Solved: I created an email script using phpmailer smtp and receiving this error: "Mailer Error: SMTP connect() failed.

I have found out why this isn't working - GoDaddy, for some reason doesn't like letting their clients using anyone else's SMTP servers, so you either have to use the email hosting provided by cPanel, which is extremely slow and inneficient.

What I've done instead is have the script hosted on an AWS ec2 instance and have the forms for the script post to that instead.

Solved: PHPMailer Mail Sending Error, But when i host my website in this server, the mail sending module shows an SMTP connect error. "SMTP ERROR: Failed to connect to server: Connection  I have it all set up correctly, because it works on my AWS EC2 server. However, when I use the exact same setup on a GoDaddy hosting plan, it doesn't work (yes, I changed 'require' paths). I am getting this error: Mailer Error: SMTP connect() failed. Here is my code:

PHPMailer SMTP Connection Failed - GoDaddy, GoDaddy mail server does not support any email containing "FROM" header entry of aol, gmail, hotmail, yahoo, live, aim or msn. If you are  The SMTP host must be the GoDaddy server host name not a derivative of your domain name as reported by the Configure Email Client screen. The SSL certificate for the SMTP servers still uses GoDaddy's secureserver.net domain, so you have to use a host on that domain to pass the server SSL security check.

[SOLVED] PHPMailer SMTP Error: Could not connect to SMTP host , Mailer Error: SMTP connect() failed. then nothing to really debug further, because it is because of a wried rule imposed by Godaddy on its user,  I currently use GoDaddy as my website hosting platform (which I believe is what someone else was referring to when he/she said "s***** hosting company") and when I tried to use Gmail SMTP authentication via PHPMailer, it did not work (apparently the SMTP request never left the GoDaddy servers).

Working on localhost but not on godaddy server · Issue #1488 , I'm having issues with Godaddy and PHPMailer. I've been SMTP ERROR: Failed to connect to server: Connection refused (111). The server  3) smtp with workflow does not work (connection refused) a hosting without SMTP, is useless, and the support leaves a lot to be desired. @MarkWebber Are you referring to pulling your Godaddy emails through your hosting account into something like gmail or outlook? It's very possible, I've been doing it for years.

Comments
  • Did you try commenting out '$mail->isSMTP()' as suggested here? stackoverflow.com/questions/18496650/…
  • @timberspine I just did so, and it doesn't work.
  • When you turn on debugging '$mail->SMTPDebug = 1', what do you see?
  • SMTPDebug = 2 would be a more useful debugging level. There are plenty of questions on SO about PHPMailer and gmail accounts as well as PHPMailer and GoDaddy. I'm sure this question is a duplicate of one of them....
  • Possible duplicate of PHP on GoDaddy Linux Shared trying to send through GMAIL SMTP
  • i am also had the same issues but solution which i mentioned is working fine.