I\'m using mail to send e-mails from PHP. It\'s working fine, but now I need to use a more secure mail server.
I need to connect with the mail server using the foll
Actually mail function doesn't provide authentication functionality. Your have to use Mail class from Mail Pear package. See here for an example: http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm
The builtin mail() function does not provide any sort of authentication. You need to use a third-party library that offers SMTP authentication. Popular choices include:
You can also search for Composer packages at Packagist.