How to send email from PHP without SMTP server installed?

前端 未结 3 2045
南笙
南笙 2020-12-09 02:46

I have a classic LAMP platform (Debian, Apache2, PHP5 and MySQL) on a dedicated server.

I heard PHPMailer can send email without having installed SMTP. Is PHPMailer

3条回答
  •  轮回少年
    2020-12-09 03:28

    You can use phpmailer to send using the default php mail() function as well.

    I recommend not trying to do things manually using the mail() function, use phpmailer instead and configure it to use mail().

    I'd like to point out that even though you're not using an SMTP connection to send the mails yourself, the mail() function will use either an SMTP connection or the server's sendmail program to send out the emails anyways, so that will have to be configured for it to work correctly.

提交回复
热议问题