Another possibility is to install mail and net_smtp through pear.
pear install Mail
pear install Net_Smtp
then you have the possibility to send mail with SMTP authentication to another server:
require_once "Mail.php";
$body = "Mein Mail Body\n";
$subject = "Mail mit SMTP Authentifizierung";
$mail_to = "[email protected]";
$mail_from = "[email protected]";
//SMTP Verbindungsdaten
$host = "smtp.meinemailserver.de";
$username = "phpmailer";
$password = "SuperGeheim";
$smtp = Mail::factory('smtp',
array (
'host' => $host,
'auth' => true,
'username' => $username,
'password' => $password
));
$headers = array (
'From' => $mail_from,
'To' => $mail_to,
'Subject' => $subject
);
$mail = $smtp->send($mail_to, $headers, $body);
if (PEAR::isError($mail)) {
echo "Fehler beim Versender der E-Mail : ". $mail->getMessage();
}
(taken from http://www.jgeppert.com/2009/06/php-e-mail-mit-smtp-authentifizierung-versenden/)