views:

210

answers:

2

I'm trying to align some text in a php generated plain text email. Thunderbird displays all characters as the same width. Newer versions of Outlook however do not. Is there some way I can force outlook to use a "fixed-width" font in the headers for instance?

Here are the headers I'm currently using

Content-Type: text/plain; charset=utf-8

A: 

Are you sending HTML email? If so, Outlook won't use fixed-width fonts.

Try specifying your content type to:

Content-Type: text/plain

... using something like:

$headers = "Content-Type: text/plain; charset=UTF-8\n";
mail($to, $subject, $message, $headers); 
Dolph
I am using those headers... Sorry I should've mentioned that. I still couldn't get it to work
Fred
Can you post the (censored) headers of the resulting email?
Dolph
To: [email protected]: Email subjectFrom: [email protected]: [email protected]: Message-Id: <[email protected]>Date: Wed, 24 Feb 2010 11:10:04 +1100 (EST)
Fred
No mention of Content-Type or charset
Fred
A: 

It's a user preference. Both Outlook and Thunderbird may be configured to use monospaced or proportional fonts. I use Thunderbird with proportional fonts.

You can't force an override short of sending HTML mail with a <pre> tag or suitable CSS.

bobince