简体   繁体   English

使用外发邮件服务器,用户名和密码验证从PHP发送电子邮件

[英]send email from PHP with outgoing mail server & userid and password authantication

what is best way to send email from PHP using server authantication. 使用服务器身份验证从PHP发送电子邮件的最佳方法是什么。

Userid & Password & outgoing mail server... 用户名和密码以及外发邮件服务器...

Thanks 谢谢

Use the PEAR Mail module. 使用PEAR Mail模块。 See the PHP: mail documentation . 请参阅PHP:邮件文档

Zend_Mail支持SMTP身份验证

The simple answer is to use a library like one of the following: 简单的答案是使用类似于以下之一的库:

  • SwiftMailer 迅捷邮件
  • phpMailer phpMailer
  • Zend_Mail Zend_Mail

One of many ways, it really depends how your scripts works. 这是多种方式之一,它实际上取决于脚本的工作方式。 More info would be helpful. 更多信息会有所帮助。 But you could just create a method that accepts the userid and password, validate the user against your database, and, if true send the email. 但是您可以创建一个接受用户名和密码的方法,根据数据库验证用户,如果是,则发送电子邮件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM