在我的 PHP Web 应用程序中,我希望在发生某些错误时通过电子邮件收到通知。我想使用我的 Gmail 帐户发送这些内容。这怎么可能做到呢?
Gmail 的 SMTP 服务器需要非常具体的配置。
From Gmail 帮助 http://mail.google.com/support/bin/answer.py?answer=13287:
Outgoing Mail (SMTP) Server (requires TLS)
- smtp.gmail.com
- Use Authentication: Yes
- Use STARTTLS: Yes (some clients call this SSL)
- Port: 465 or 587
Account Name: your full email address (including @gmail.com)
Email Address: your email address ([email protected] /cdn-cgi/l/email-protection)
Password: your Gmail password
您也许可以在中设置这些设置梨::邮件 http://pear.php.net/package/Mail or PHP邮件程序 http://phpmailer.codeworxtech.com/。查看他们的文档以了解更多详细信息。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)