send email from PHP with outgoing mail server & userid and password authantication
what is best way to send email from开发者_高级运维 PHP using server authantication.
Userid & Password & outgoing mail server...
Thanks
Use the PEAR Mail module. See the PHP: mail documentation.
Zend_Mail supports SMTP authentication
The simple answer is to use a library like one of the following:
- SwiftMailer
- phpMailer
- 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.
精彩评论