Use
Code:
include("Mail.php");
$recipients = "thatguy@over.there.com";
$headers["From"] = "whatever@your.domain.com";
$headers["To"] = $recipients;
$headers["Subject"] = "This is the subject";
$body = "The Body";
$params["host"] = "my.mailhost.com";
$params["port"] = "25";
$params["auth"] = true;
$params["username"] = "username";
$params["password"] = "password";
// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory("smtp", $params);
$mail_object->send($recipients, $headers, $body);
(In other words, do the right thing in PHP - otherwise you'll have to have sendmail installed and configured correctly to relay outgoing mail, and even then it won't work if the other server doesn't allow you to relay)
Bookmarks