PHPMailer & gmail No Longer Working

Asked by:
Dustin_M / 11 Points
Time:
2013-04-04 6:48 pm EST
Category:
Email Troubleshooting
Hits:
4,322
I had configured a form to use PHPMailer (http://www.webhostinghub.com/support/email/send-email-from-a-page/using-phpmailer-to-send-mail) with some minor changes to use SSL SMTP authentication with gmail. It worked two days ago and then yesterday it just stopped working. Are there any known problems that have arisen within the last few days?

The reported error from PHP is:
SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
The following From address failed: xxxxx@xxxxx.com : Called Mail() without being connected Message was not sent.Mailer error: The following From address failed: xxxx@xxxxx.com : Called Mail() without being connected

It looks like it is never able to establish a connect with smtp.gmail.com.

I've followed the guide inside the PHPMailer folder for gmail examples, but here is a code snippet.

require("PHPMailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 2;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com"; //also tried ip address
$mail->Port = 465;
$mail->Username = "xxxx@xxxxx.com";
$mail->Password = "xxxxxxxxxxxx";
$mail->From = "xxxx@xxxxx.com";
$mail->FromName = "Administrator";
$mail->Subject = "A New Form Request";
$mail->AddAddress("yyyyy@yyyyy.org","$firstname" . "$lastname" );
$mail->Body = $message;
$mail->WordWrap = 70;

if (!$mail->Send())
{
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
}else {
echo "Message has been sent";
}

Thanks to anyone who can help.

To ask this user for more information, please first login.

To submit an answer, please login.

ANSWERS

0

JacobN
Staff
3,713 Points
2013-04-04 8:32 pm EST
Hello Dustin,

It does look like there are some issues with the server being able to connect to Gmail servers at this time for relaying mail.

We currently have a status message up on our site at http://status.webhostinghub.com/ regarding these temporary issues.

Our system administration team is hard at work on having these issues resolved, and we apologize for the inconvenience in the meantime.

- Jacob

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}