Outlook Mail API returns spellcheck class names as part of html response when using List Messages

470 views Asked by At

I am currently using the outlook mail api to retreive messages from a specific shared folder (List Messages Request), when i get a response from the query i want to read the body content in this case my header prefers html.

What i'm trying to achieve is string replacement from the html response.

The problem is inside my shared emails i have something like this:

Hello [UserName], further text in mail message, Regards [CompanyName].

and the response i get from the api looks like this:

<p class=\"MsoNormal\">Hello [<span class=\"SpellE\">UserName</span>],</p><p class=\"MsoNormal\">&nbsp;</p><p class=\"MsoNormal\">further text in mail message, Regards [CompanyName].</p>

the response shows a spelling error has been returned with one of my string placement texts and not the other, this is not ideal because i dont want to rely on me writing some code to check if:

[<span class=\"SpellE\">UserName</span>]

exists or not, mainly because this could be subject to change at any given time and that would be a breaking change to the system.

Is there any way i can disable spell checking being returned in the html?

1

There are 1 answers

2
Jose Manuel Gomez Alvarez On

Try disabling spell checking in Microsoft Outlook,

  • File -> Options -> Mail -> Spell

either through the application or programatically by altering the configuration in the windows registry.

Look at

HKCU\Software\Microsoft\Office\11.0\Outlook\Options\Spelling
HKCU\Software\Microsoft\Shared Tools\Proofing Tools\1.0\Office\OutlookSpellingOptions
HKCU\Software\Microsoft\Spelling