Hi i got this from one of the forums...
<?php
require_once "Mail.php";
$from = "Sender <sender@example.com>";
$to = "Recipient <xxx@gmail.com>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$host = "smtp.xxx.com";
$username = "xxx";
$password = "xxx";
$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("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>
and got this errors:
Warning: Mail_smtp::include_once(Net/SMTP.php) [function.Mail-smtp-include-once]: failed to open stream: No such file or directory in C:\php\PEAR\Mail\smtp.php on line 206
Warning: Mail_smtp::include_once() [function.include]: Failed opening 'Net/SMTP.php' for inclusion (include_path='.;c:\php\includes;C:\php\PEAR') in C:\php\PEAR\Mail\smtp.php on line 206
Fatal error: Class 'Net_SMTP' not found in C:\php\PEAR\Mail\smtp.php on line 210
can anyone help pls?
php newbie