PHPMailer GoDaddy Server SMTP Connection Refused

I’m on GoDaddy on a Linux like @surfbird0713. On my 32nd attempt, the following worked for me as well:

$mail2->Host = localhost;
//$mail2->SMTPAuth = false;
//$mail2->Username="[email protected]";
//$mail2->Password = '*******';

//$mail2->SMTPSecure="tls";

//$mail2->Port = 465;

I was previously trying with the username, login, port, etc. When I commented out all those, and just went with localhost it worked.

Leave a Comment