Authentication php mail

前端 未结 2 844
情深已故
情深已故 2020-12-10 13:34

I\'m using mail to send e-mails from PHP. It\'s working fine, but now I need to use a more secure mail server.

I need to connect with the mail server using the foll

相关标签:
2条回答
  • 2020-12-10 13:56

    Actually mail function doesn't provide authentication functionality. Your have to use Mail class from Mail Pear package. See here for an example: http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm

    0 讨论(0)
  • 2020-12-10 14:16

    The builtin mail() function does not provide any sort of authentication. You need to use a third-party library that offers SMTP authentication. Popular choices include:

    • PHPMailer
    • Swift Mailer
    • PEAR Mail (has not been updated for a while)

    You can also search for Composer packages at Packagist.

    0 讨论(0)
提交回复
热议问题