I am getting the following error from PHP Mailer when running a script in my local PC:
SMTP -> ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)
This is my PHP Mailer main settings
$mail = new PHPMailer(); $mail->IsSMTP(); // set mailer to use SMTP $mail->SMTPDebug = 2; $mail->Debugoutput = 'html'; $mail->Port = 25; $mail->Host = '<removed>'; $mail->SMTPAuth = true; // turn on SMTP authentication
It seems I can't connect to the SMTP server, however I am using the same credentials with my Gmail account (for
Send mail as purposes) and it works fine.
The same script works when I test it to the actual SMTP server's
publc_html folder but not in my local PC.
It seems the SMTP server is treating my local PC as an "outsider" but how come it allows Gmail to use my credentials? Me thinks, technically, Gmail and my PC is an "outsider".
Update: It seems the issue is actually in my local PC since I uploaded the same script in different remote server and it worked. Any ideas what could be the problem in my local PC? I already tried disabling the firewall.