How to send an HTML email using SMTP in PHP

后端 未结 6 1618
醉梦人生
醉梦人生 2021-01-14 19:56

I\'ve been able to send an email using SMTP in PHP, but when I try to change the Content Type to HTML, the email doesn\'t get delivered. This is the code I\'m trying to use:

6条回答
  •  北荒
    北荒 (楼主)
    2021-01-14 20:55

    The problem most likely lies in the Mail class, but since we don't know what Mail class you're using, it's difficult to answer. If you're not already doing so, I'd really think about using PHPMailer: https://github.com/PHPMailer/PHPMailer

提交回复
热议问题