SMTP = smpt.gmail.com
smtp_port = 465
sendmail_from = mddipen@gmail.com
when i try to use mail function that time it will give me the following error so give me the proper configuration line to send mail in gmail account.
i am currently use iis for run php program.
Following is my code of email.php file:
Expand|Select|Wrap|Line Numbers
- <?php
- if(mail('mddipen@gmail.com','test subject','test message'))
- echo('ok');
- else
- echo('not ok');
- ?>
Following is my error message:
Warning: mail() [function.mail]: Failed to connect to mailserver at "smpt.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\revant\New Folder\email.php on line 3
not ok