View Full Version : problem sending email

12-19-2008, 10:17 AM
error_reporting(E_ERROR | E_WARNING | E_PARSE);

$email = "ec@adddd.com";
$to = $email;
$subject = "test";
$body = "Pleatest audio";


$mail = new PHPMailer();

$mail->IsSMTP(); // send via SMTP
$mail->Host = "mail.t.com"; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "mail@ti.com"; // SMTP username
$mail->Password = "mail12"; // SMTP password

$mail->From = "info@t.com";
$mail->FromName = "Ti";

$mail->WordWrap = 50; // set word wrap

$mail->IsHTML(true); // send as HTML

$mail->Subject = $subject;
$mail->Body = $body;

echo "here";
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
echo "here2";
echo "message setn";


this is not working
i'm not getting a mailerror -- the last echo itechos is here (but not the here2) and no email gets sent

Please advise.

12-19-2008, 02:24 PM
This is a problem with you're actual PHPMailer class, and not with you're usage of it. It could be a code error or a configuration problem.
If I had to guess, the Send function is tossing a muted exception thats terminating you're script (preventing the following code from executing). Check PHPMailer::Send() to see if it includes any required arguments that you're missing, if its generating a die or throwing an exception. You may receive more information if you use E_ALL for you're error reporting - right now you're just running against E_ERROR, E_WARNING, and E_PARSE.