OK -- but as of version 4.0 there was no support
for authentication. I have not reviewed the change logs for 4.1,
but I do know that this is not really top priority for development so I
doubt it was added.
Here is a short script that serve your authentication needs.
<?php
$smtp_server = "smtp.yourisp.com";
$port = 25;
$mydomain = "yourisp.com";
$username = "user";
$password = "password";
$sender = "me@acme.com";
$recipient = "joe@company.com";
$subject = "test";
$content = "test";
// Initiate connection with the SMTP server
$handle = fsockopen($smtp_server,$port);
fputs($handle, "EHLO $mydomain\r\n");
// SMTP authorization
fputs($handle, "AUTH LOGIN\r\n");
fputs($handle, base64_encode($username)."\r\n");
fputs($handle, base64_encode($password)."\r\n");
// Send out the e-mail
fputs($handle, "MAIL FROM:<$sender>\r\n");
fputs($handle, "RCPT TO:<$recipient>\r\n");
fputs($handle, "DATA\r\n");
fputs($handle, "To: $recipient\n");
fputs($handle, "Subject: $subject\n\n");
fputs($handle, "$content\r\n");
fputs($handle, ".\r\n");
// Close connection to SMTP server
fputs($handle, "QUIT\r\n");
?>
Bear in mind this is untested, and thrown together, but for a dollar - well you know. ;)
Hope this helps