Cannot send email via php script
Here is the script:
";
$subject = "Test Php script";
$body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit...";
$host = "mail.############.com";
$username = "james@############.com";
$password = "PASSWORD";
$headers = array('From' => $from, 'To' => $to, 'Subject' => $subject);
$smtp = Mail::factory('smtp', array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if ( PEAR::isError($mail) ) {
echo("
Error sending mail:
" . $mail->getMessage() . "
Message sent.
"); } ?> Here is the Error: ###@######.com [~/AmIUpNow]# php -f test.php Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/lib/php/Mail/smtp.php on line 206 Warning: include_once(): Failed opening 'Net/SMTP.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /usr/lib/php/Mail/smtp.php on line 206 Fatal error: Class 'Net_SMTP' not found in /usr/lib/php/Mail/smtp.php on line 210