How do I specify to PHP that mail() should be sent using an external mail server?

前端 未结 6 602
盖世英雄少女心
盖世英雄少女心 2020-12-11 03:50

I have my email hosted at Rackspace Email and would like to use that as my mail server for the contact form on my website.

Looking at the php.ini file, I\'m only abl

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-11 04:07

    mail() is intended to hand off to a local SMTP server, and does a poor job of it. For proper mail support, use Swiftmailer or PHPMailer, both of which fully support external SMTP servers and are far easier to use (plus letting you do things like mixed text/html mails, attachments, etc...)

提交回复
热议问题