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

javascript - WinJS appendTextAsync producing scheduler errors -

minify - Minimizing css files -

Sockets with kotlin -