php send email via gmail (php.ini) with php internal mail function (win7)

穿精又带淫゛_ 提交于 2020-01-06 13:29:48

问题


Is there anyway to send email via gmail (or other free provider) in php.
But I want to use php built in mail() function.

This solution is only for dev and staging.

Thanks


回答1:


You can, using PHPMailer. And also check here to know details you should provide in your script so that you be able to send using Gmail SMTP.

Source

Plenty of walk-throughs and pre-made scripts/classes if you just used google. Unless you want to make yours from scratch.




回答2:


If you don't want to use libraries but still want to send email via gmail, you have to setup SMTP server which sends email via Gmail. One very easy alternative is SSMTP. Setting up SSMTP is very easy. http://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with-ssmtp/

Hope it helps.



来源:https://stackoverflow.com/questions/7618691/php-send-email-via-gmail-php-ini-with-php-internal-mail-function-win7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!