Forum Moderators: phranque
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.
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.
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.
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.
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.
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>
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]