开发者

headers for html email php

What is the minimum amount of headers you need to add to a html e-mail. Also, please tell which ones I'开发者_Go百科ll need to add or remove. I got

    $HEADERS  = 'MIME-Version: 1.0' . "\r\n";
    $HEADERS .= 'Content-type: text/html; charset=UTF-8' . "\r\n";

also, is there any other way to right this better?

thanks


Take a look at PHPMailer or SwiftMailer, which provide a nice, easy and flexible API for sending emails from PHP. They give you additional functionality such as adding attachments to emails or connecting to another SMTP server and also provide a safer way of sending out emails from user supplied data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜