require_once("libphp-phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "smtp.comcast.net";
//$mail->Host = "localhost";
//$mail->SMTPAuth = true;
$mail->WordWrap = 60;
//$mail->SetFrom("jharvard@cs50.net");
$mail->SetFrom("testmail@example.com");
$mail->AddAddress("kyzcreig@gmail.com");
$mail->Subject = "BUY! Receipt";
$mail->Body =
"You just bought {$_POST["symbol"]}:
";
if ($mail->Send() == false) {
die($mail->ErrInfo);
}
I get this error when I run the above code:
Not sure what it means. I'm fairly new to PHP too so maybe I'm missing something?
If I try to use the generic mail() function that also fails. Although it doesn't give any error message.