email - PHP mail function fails to send mail to gmail -


i using mail function send mail via php script gmail. here code :

if( mail($to,$subject,$message,$headers))        echo "mail sent"; else     echo "mail not sent"; 

every time echos "mail not sent". fails gmail works other servers.

any idea why so? thanks.

you should start checking smtp configration(smtp stands simple mail transfer protocol). can find in php.ini; line reads [mail function]


Comments

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -