You are here: PHPMailer debugging (Failed to connect to server) « PHP Programming Language « IT news, forums, messages
PHPMailer debugging (Failed to connect to server)

Posted by jephperro on 12/03/07 23:02

Hi there,

I have a problem using PHPMailer.

On my local development machine, the script works fine and sends
emails.

On amy staging server, when I try to use PHPMailer to send() I see the
error:
SMTP -> ERROR: Failed to connect to server: Permission denied (13)

Can anyone think of why my staging server is preventing my connection
to the external mailserver? Is there a setting in php.ini or apache
that could be preventing this?




Code:
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = true;
$mail->SMTPAuth = true;
$mail->Username = "XXXXXXXXXX";
$mail->Password = "XXXXXXXXXXX";
$mail->Host = "21x.xxx.xxx.xxxx";

$mail->Subject = "Test Email"; // $email_subject;
$mail->From = "cccc@cccccccc.com"; // $from_email_address;
$mail->AddAddress("cxxcxxxxcxc@gmail.com", "TEST YOU"); //
($to_email_address, $to_name);

$mail->Send();

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация