I may be wrong, but I think there is no way you can authenticate to a mail server using just the mail() function in php.
You should set your server to allow emails from localhost/ local IP without authentication.
I use phpMailer class from here:
http://phpmailer.sourceforge.net/
It is open source and has a lot of functionality, including authentication on smtp servers.
Reputation Points: 33
Solved Threads: 7
Junior Poster in Training
Offline 92 posts
since May 2007