开发者

sending only a text email instead of html

I have this code at the top of my email php file which sends out emails

    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; char开发者_StackOverflowset=iso-8859-1' . "\r\n";
    $headers .= "From: $from <$from>" . "\r\n";
    $headers .= 'Cc: matt.e@posnation.com' . "\r\n";
    $headers .= 'Bcc: posnation@gmail.com' . "\r\n";

I need to change this to just a plain text email ...what do i change. I was thinking the second line text/html to text/text but i wasnt sure


You want to change the "text/html" to "text/plain".


You can use text/plain

But if you enter html content the tags and all will be shown on the client though ...

But i'm sure there's an alternate way to support both text and html ...

Are you using the built in mail function or an external mail app like phpMailer?


You don't need to change anything.

Technically it should be "text/plain", but if you want, you can just as easily send an "HTML" email with no HTML tags and it will work just fine.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜