Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from Jun 29 '13 at 6:50

This question came from our site for professional and enthusiast programmers.

Your ISP May be blocking access to third-party SMTP Servers. I work customer support at a hosting company and we frequently get customers calling in who can't connect their mail clients to our SMTP Servers. A lot of ISPs block them and force their customers to use their own SMTP servers instead.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .