Im trying to send email through a Qmail server using phpmailer. After sending, i get the message "meesage was sent" but no message is every received.. Heres my code:
<?php
require("class.phpmailer.php");
$name = "Purchase Form";
$email_subject = "New Purchase Ticket";
$body = NULL;
foreach ($_REQUEST as $field_name => $value){
if (!empty($value)) $body .= "$field_name = $value\n\r";
}
$mail = new PHPMailer();
$mail->IsQmail();
$mail->FromName = $name;
$mail->AddAddress('*******@*********', 'Purchase Ticket');
$mail->Body = $body;
$mail->IsHTML(false);
$mail->Subject = $email_subject;
if(!$mail->Send())
{ echo "didnt work";
}
else {echo "Message has been sent";}
?>
From the command line I can type mail *****@****.com blah blah
and it successfully sends..