PHPMailer - first PHP attempt - no work, no errors.
Posted: Mon Nov 20, 2006 6:54 pm
I just finally got PHP to read my php.ini (from this thread: viewtopic.php?p=331711#331711), so now I'm trying to launch a very simple example.
I downloaded the PHPMailer libarary, place phpmailer.php in my /var/lib/php, and I'm trying to execute the following code:
It gets only executed as far as the "Test Mail..." HTML string, the rest doesn't get proccessed. No errors or anything. I check out my log file (/usr/local/apache2/logs/php.err) - but it doesn't even exist (and I do have it specified, here's my phpinfo: http://thailandhaven.com/test.php). There are no errors in the apache log either.
So what kind of BS is this?
Here's the output of the code btw:
http://thailandhaven.com/phpMailerTest.php
I downloaded the PHPMailer libarary, place phpmailer.php in my /var/lib/php, and I'm trying to execute the following code:
Code: Select all
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Test Mail...
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
//$mail->IsSMTP();
$mail->From = "admin@ablogic.net";
$mail->Host = "localhost";
$mail->AddAddress("ivj@comcast.net");
$mail->Subject = "Test SUbject";
$mail->Body = "Test Body";
if(!$mail->Send())
{
echo "Message was not sent <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
?>
Second test...
</body>
</html>So what kind of BS is this?
Here's the output of the code btw:
http://thailandhaven.com/phpMailerTest.php