How to stop Exchange 2007 from automatically converting plain text emails to HTML

exchangeexchange-2007htmlmime

this.. nice.. exchange server converts my text/plain messages from text to html and messes them up, just because it detects html somewhere in the body.

how can i stop him from doing so?

edit: i am looking for a server side fix – this is affecting automatically generated emails from an application server. the messages are generated in java explicitly with

     message.setContent("This is a <span>Test</span>", "text/plain");

like mundeep points out.

i think it does not matter, but the messages are retrieved via outlook directly or via exchange web access. (without pop/imap)

Best Answer

You don't mention how the messages are being retrieved, but I have seen this before with Exchange 2007 and IMAP retrieval (though I believe it affects POP3 as well).

Have a look at this Technet document, specifically the ImapMessagesRetrievalMimeFormat switch. The documentation is exceedingly vague, but Exchange can force the format of the messages as they are retrieved from the server, either by user (as the link indicates) or on the service itself; in which case you would use the Set-ImapSettings command, and change the MessageRetrievalMimeFormat option.

The current setting for the service on your host can either be seen using PowerShell using the following and looking for 'MessageRetrievalMimeFormat':

Get-ImapSettings | fl

Alternatively you can use the GUI:

  1. Expand 'Server Configuration'
  2. Expand 'Client Access'
  3. Select the server that you want to manage, then the 'POP3 and IMAP' tab
  4. Get the properties of the appropriate connector and examine the 'Retrieval Settings' tab. The MIME format for the connector in question can be seen/changed in the 'Message MIME format' drop-down box at the top of this box.

A similar thing can be done for individual mailboxes by getting the properties of the mailbox and looking at the 'Mailbox Features' tab.

I can't tell you what setting is correct for your situation (as the documentation is so vague), but my Exchange 2007 installation has the setting left on 'Best Body Format'.

Related Topic