/    Sign up×
Community /Pin to ProfileBookmark

HTML mail sent from mail() displays in plain text in outlook

Hi all,
I’m trying to send html emails out from a web-application,
my boss i recieving the emails that are supposed to be html formated in plain text.
in gmail, the emails display correctly

I used these two headers:
$headers = “MIME-Version: 1.0rn”;
$headers .= “Content-type: text/html; charset=iso-8859-1rn”;

I ran into this issue a few years back, but cant seem to find a solution anymore

Thanks for your help.

Nick
[Solution]
As we all know microsoft sux, and requires the last header to be
$headers = “MIME-Version: 1.0rn”;
so i just switched both headers and it worked fine.
[/Solution]

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@bejitto101Dec 08.2008 — Could you provide the code? Because as far as I know, there is nothing wrong with those headers.
Copy linkTweet thisAlerts:
@nicholasjstockauthorDec 08.2008 — thanks man, microsoft sux.
Copy linkTweet thisAlerts:
@TecBratDec 08.2008 — Hi all,

I'm trying to send html emails out from a web-application,

my boss i recieving the emails that are supposed to be html formated in plain text.

in gmail, the emails display correctly

I used these two headers:

$headers = "MIME-Version: 1.0rn";

$headers .= "Content-type: text/html; charset=iso-8859-1rn";

I ran into this issue a few years back, but cant seem to find a solution anymore

Thanks for your help.

Nick[/QUOTE]


I think our strings are equivilent, but just in case, here's what I use.
[code=php]$headers = 'MIME-Version: 1.0' . "rn";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "rn";[/code]


Is it perhaps a setting in his outlook? Have you tried sending it to someone else that uses outlook?
Copy linkTweet thisAlerts:
@MindzaiDec 08.2008 — I seem to remember outlook (the version I used in my last job anyway, 2003 I think) defaults to plain text view. Not alot you can do about that, as others have said your headers are correct but if the client chooses plain text it's outside your control.
×

Success!

Help @nicholasjstock spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...