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 = "XXXXXXXXXX X";
$mail->Host = "21x.xxx.xxx.xx xx";
$mail->Subject = "Test Email"; // $email_subject;
$mail->From = "cc**@cccccccc. com"; // $from_email_add ress;
$mail->AddAddress("cx *********@gmail .com", "TEST YOU"); //
($to_email_addr ess, $to_name);
$mail->Send();