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

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -