Welcome to WebmasterWorld Guest from 3.209.80.87

Forum Moderators: phranque

Message Too Old, No Replies

Outlook 2007 only showing raw HTML code

But it can't be a coding problem...

     
5:33 pm on Jul 6, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 13, 2004
posts: 106
votes: 0


Hi all,

I have Outlook 2007 setup on two different computers. One is only seeing the raw HTML code from a web submitted form while the other is showing the email as it should be, no problems at all.

As far as I can tell all settings are the same but please let me know what I should double check to be sure.

Thanks for any help with this matter.

5:41 pm on July 6, 2008 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts: 12172
votes: 61


In Outlook...

Tools > Options > Preferences > Email Options > Read all mail in plain text

Is that box checked?

6:07 pm on July 6, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 13, 2004
posts:106
votes: 0


I actually don't see that checkbox, here are all the ones I see (all are checked on the one that is working correctly).

Close original message on reply

save copies of sent messages in sent folder

Automatically save unsent messages

Remove extra line breaks in plain text messages

Shade message headers when reading mail

Thanks for the help so far btw, it really is appreciated.

6:21 pm on July 6, 2008 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts: 12172
votes: 61


Hmmm, I'm still using 2003, maybe they changed the placement of it?

What you are looking for is an option that allows you to read mail in text or html. Some people will "always" set this to text because there are associated risks with html email if you've not implemented some additional security measures.

How to view all e-mail messages in plain text format
[support.microsoft.com...]

<added> It is different in 2007.

To turn on the Read all standard mail in plain text option in Outlook 2007, follow these steps:
1. Start Outlook 2007.
2. On the Tools menu, click Trust Center, and then click E-mail Security.
3. Under Read as Plain Text, click to select the Read all standard mail in plain text check box.
4. To include messages that are signed with a digital signature, click to select the Read all digitally signed mail in plain text check box.
1:38 am on July 7, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


One is only seeing the raw HTML code from a web submitted form

It's probably an Outlook issue, but to get all duckies in a row - be certain your mailer program is printing a content-type text/html header. No header or content-type text/plain header will tell the receiving program to interpret the mail as plain text.

2:59 am on July 7, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 13, 2004
posts:106
votes: 0


I kind of get what you're saying as after searching Google I have been seeing allot of topics with header questions.

The bad part is I am not sure how to check this, care to give me some advice as to how or point me in a direction that could help?

Thanks for all the help so far.

5:21 pm on July 7, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


Don't let me send you on a red herring, as mentioned, it is most likely an Outlook problem since one is working and one is not. Did you pursue the solutions in the previous posts? If so and it's still not working, we'd need to know what your mailer is, by posting code or by the generic name, if it's a freebie.

Somewhere in your script will be the section that does the mailing. A mail header looks something like this. This is on no particular language because the syntax will vary based on the language.

(some function to open the mail program)
print "To:[to-address]\r\n";
print "From: [from address]\r\n";
(optional) print "Date: [valid date]\r\n";
print "Subject: [mail subject]\r\n";
print "[message body]\r\n";
(close the mail program)

These are the mail headers. For proper HTML output, you should find the content-type:text/html header. Also, for properly formed email, if it's html email it should contain opening and closing html/body tags, so it should look SOMETHING like this:

(some function to open the mail program)
print "To:[to-address]\r\n";
print "From: [from address]\r\n";
(optional) print "Date: [valid date]\r\n";
print Content-type:text/html; charset=US-ASCII\r\n";
print "MIME-Version: 1.0\r\n";

print "Subject: [mail subject]\r\n";
print "<html><head><title>[subject]</title></head><body>\r\n";
print "[message body]\r\n";
print "</body></html>\r\n";
(close the mail program)

Absence of the opening/closing html tags will gain you spam points in spamAssassin (actually, so will html email, but if the html is properly formed it will help.)

It may even be in an "if" conditional, that is, if your program has an option to turn html email on or off, you may see stuff like

if ($html_email == '1') {
print Content-type:text/html; charset=US-ASCII\r\n";
}

As said, this is only part of the story and in no particular language, but look through your script to see if you can find content-type headers for the mail.

5:55 pm on July 7, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 13, 2004
posts:106
votes: 0


I will look intot hat as soon as I post this, here is a few updates since yesterday:

1. The emails show up perfect inside the GoDaddy web mail inbox

2. Outlook Express displays the raw code as well

3. If the emails are sent as a forward, they show up perfect in the Outlook inbox, but if submitted directly they show up in raw code

^
(that one really has be banging my head)

4. This only started when the website was moved to a dedicated host. Here is the exact way the accounts are setup:

All emails are under account A
All web pages and databases are under account B

I edited the MX and CNAME records so they could still use their emails as is, they did not want to move their email addresses at all.

Below is an exact copy of how they are receiving emails. I replaced any real emails contact info or IP addresses but everything else is the same.

-----Original Message-----
From:
Sent: None
To: user@email.com
Subject: New Submission Made

Content-type: text/html; charset=iso-8859-1

Content-Transfer-Encoding: 8bit
From: support@email.com
X-Priority: 1
X-MSMail-Priority: High
X-Mailer: PHP/5.2.4
Message-Id:
<20080706104138.42E7633C10A@ip-12-345-678-900.ip.secureserver.net>
Date: Sun, 6 Jul 2008 03:41:38 -0700 (MST)
X-Nonspam: IP whitelist 64.202.189.166

<html><body>
<p>Please review the following books and reply with an offer. (QuoteID:
user@email.com) :</p> <table cellpadding=5
border=1>
<tr><td>ISBN</td><td>Title</td><td>Quantity</td><td>Found
in</td><td>Action</td></tr>
<tr><td>0123456789</td><td>Title: The Book (Coleccion Poesia) <br>
Pub: <br>
Comment: </td><td>5</td><td>User
Submitted</td><td>Buy</td></tr><tr><td>7777777777</td><td>Title: Man Booker Prize Winner 2003 (Man Booker) <br>
Pub: Gardners Books Ltd <br>
Comment: </td><td>2</td><td>User Submitted</td><td>Sell</td></tr>
</table><p> <b>User Details
:</b><br>AgentID = 52<br>
Prefix = Mr.<br>
FirstName = Bob<br>
LastName = Smith<br>
email = user@email.com<br>
password = UsersPassword<br>
Phone = 1234567890<br>
Ext = <br>
Fax = <br>
SchoolName = <br>
SchoolDistrict = <br>
RegDate = 1178220737<br>
</body></html>

1:29 am on Sept 12, 2008 (gmt 0)

New User

10+ Year Member

joined:Nov 30, 2006
posts: 13
votes: 0


Did you ever find a solution to this problem? I'm having the exact same problem and I've been searching online for answers for the past hour when I came across this post.

I have a php page that processes a form and emails the contents to my client. In my Outlook 2007 the email shows up fine. In my Mac Mail...fine. It even shows up fine in AOL!

But of course on my client's Outlook 2003, she is just getting the raw HTML code.

This is a new addition to the string of posts here....the email she receives doesn't just show the raw HTML code, it even includes the header info as part of the message body:

Content-type: text/html; charset=iso-8859-1;

From: Sample Request <example@example.com>
Return-Path: anonymous@example.com
X-OriginalArrivalTime: 11 Sep 2008 16:18:46.0359 (UTC)
FILETIME=[11067E70:01C9142A]

And on in the FROM line on the regular email it is empty:

From:
Sent: Thursday, September 11, 2008 9:24 AM
To: A User
Subject: New Sample Request Submission

Here is how I have the php programming setup to send the mail:

$to = 'user@example.com';
$re = 'Sample Request Form';
$msg = '

<table>
etc
</table>';

$headers = "MIME-Version: 1.0 \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1; \r\n";
$headers .= "From: Sample Request <example@example.com> \r\n";

mail($to,$re,$msg,$headers);

Anyone have any ideas?

[edited by: phranque at 5:47 am (utc) on Sep. 21, 2008]
[edit reason] exemplified url [/edit]