Convert incoming mail to plain text
Solution 1
I decided to use the HtmlAgilityPack and manually parse the email body. I couldn't seem to find an exhange server solution.
Solution 2
If your application is getting mail from a specific mailbox using POP3 or IMAP, you can configure the mailbox's POP3/IMAP settings so that Exchange serves plain text only, regardless of the format of messages in the mailbox.
I haven't worked on Exchange 2003 in quite a while, nor do I have access to a 2003 server, so I can't give you the exact place to look, but if you view the mailbox properties using AD Users & Computers on the Exchange server, it shouldn't be too hard to spot.
Update: after a bit of searching, I managed to find the location of the setting I was thinking of.
On your Exchange Server, open AD Users & Computers, it should be under Start/All Programs/Microsoft Exchange.
- Find the relevant mailbox used by your application and open it's properties page.
- Select the "Exchange Features" tab.
- On the tab you should see a "Protocols" section (example).
- If you click on IMAP4 and then Properties, you should be able to force plain text there.
I have done this in the the past with an app that polled a mailbox using POP3 so I know for a fact it works. I'm 99.9% sure the exact same option is available for IMAP4.
Solution 3
Related videos on Youtube
James
Updated on September 17, 2022Comments
-
James over 1 year
Is it possible to convert incoming emails sent in HTML format to plain-text in Exchange Server 2003?
Alternatively, is it possible to retrieve emails from Exchange Server as plain-text only?
-
James over 14 yearsHi, I am connecting to IMAP and I have tried all the settings possible on the exchange server i.e. only allow plain text. However, It doesn't seem to work I am still getting HTML in the body.
-
James over 14 yearsAh ok I was doing this settings from the Exchange System Manager. I will give it a try, thanks!
-
James over 14 yearsHi I tried this and the body is still in HTML. Do I need to reboot the server before the changes take effect?
-
James over 14 yearsI just did some research about that settings and I think that only restricts that account to sending emails as plain text, not converting them as they come in :(
-
ThatGraemeGuy over 14 yearsPOP3 and IMAP are not related to sending mail, those settings are definitely for controlling the format/s for receiving mail.
-
Joachim Sauer over 10 yearsWhilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.