Mail Function error for gmail/hotmail

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
leng0788
Forum Newbie
Posts: 1
Joined: Fri Jun 11, 2010 1:53 am

Mail Function error for gmail/hotmail

Post by leng0788 »

Hi, I got the error message:
"Warning: mail() [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first in
C:\xampp\htdocs\php_test\firstmail.php on line 6"


when I tried to use the mail() function. I'm using xxamp and it works fine for all PHP except for send mail.

How do I configure my php.ini and sendmail.ini in order to use the mail() function? Really appreciate your help.
internet-solution
Forum Contributor
Posts: 220
Joined: Thu May 27, 2010 6:27 am
Location: UK

Re: Mail Function error for gmail/hotmail

Post by internet-solution »

Gmail and Hotmail requires TLS protocol for authentication, which is not possible through php mail() function alone. Google for php mail with TLS and you will find many php mail classes that provides this.
Post Reply