PHPMailer debugging (Failed to connect to server)
am 04.12.2007 00:02:35 von jeff.perreaultHi 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();