You can try and use the socket method for authentication on the SMTP server - either that or look at the pear mail function...
This is my take on the socketmail function...
function socketmail($fromName, $fromAddress, $toArray, $subject, $message) {
ini_set("sendmail_from", $fromAddress);
$handle = pfsockopen ("127.0.0.1",25, $errno, $errstr, 30) or die("Could not talk to the sendmail server!<br/>$errno<br/>$errstr");
$rcv = fgets($handle, 1024);
fputs($handle, "HELO {$_SERVER['SERVER_NAME']}\r\n");
$rcv = fgets($handle, 1024);
while (list($toKey, $toValue) = each($toArray)) {
fputs($handle, "MAIL FROM:$fromAddress\r\n");
$rcv = fgets($handle, 1024);
fputs($handle, "RCPT TO:$toValue\r\n");
$rcv = fgets($handle, 1024);
fputs($handle, "DATA\r\n");
$rcv = fgets($handle, 1024);
fputs($handle, "Subject: $subject\r\n");
fputs($handle, "From: $fromName <$fromAddress>\r\n");
fputs($handle, "To: $toKey <$toValue>\r\n");
fputs($handle, "X-Sender: <$fromAddress>\r\n");
fputs($handle, "Return-Path: <$fromAddress>\r\n");
fputs($handle, "Errors-To: <$fromAddress>\r\n");
fputs($handle, "X-Mailer: PHP - SocketMail\r\n");
fputs($handle, "X-Priority: 3\r\n");
fputs($handle, "Content-Type: multipart/alternative;\r\n");
fputs($handle, " boundary=\"----=_NextPart_000_000A_01C3EE3F.867B1730\"\r\n");
fputs($handle, "\r\n");
fputs($handle, "This is a multi-part message in MIME format.\r\n");
fputs($handle, "\r\n");
fputs($handle, "------=_NextPart_000_000A_01C3EE3F.867B1730\r\n");
fputs($handle, "Content-Type: text/plain;\r\n");
fputs($handle, " charset=\"ISO 8859-1\"\r\n");
fputs($handle, "Content-Transfer-Encoding: base64\r\n");
fputs($handle, "\r\n");
fputs($handle, chunk_split(base64_encode($message)) . "\r\n");
fputs($handle, "\r\n");
fputs($handle, "------=_NextPart_000_000A_01C3EE3F.867B1730\r\n");
fputs($handle, "Content-Type: text/html;\r\n");
fputs($handle, " charset=\"ISO 8859-1\"\r\n");
fputs($handle, "Content-Transfer-Encoding: base64\r\n");
fputs($handle, "\r\n");
fputs($handle, chunk_split(base64_encode($message)) . "\r\n");
fputs($handle, "\r\n");
fputs($handle, "------=_NextPart_000_000A_01C3EE3F.867B1730--\r\n");
fputs($handle, "\r\n");
fputs($handle, ".\r\n");
$rcv = fgets($handle, 1024);
if (trim($rcv)=='250 OK')
{
return true;
}
else
{
return false;
}
fputs($handle, "RSET\r\n");
$rcv = fgets($handle, 1024);
}
fputs ($handle, "QUIT\r\n");
$rcv = fgets ($handle, 1024);
//echo("$rcv<br>");
fclose($handle);
ini_restore("sendmail_from");
}
One goo dway of testing is to telnet onto the SMTP server and try and send a mail that way.