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

1

8

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?

Bhakti answered 14/11, 2018 at 11:25 Comment(4)
Does it happen for all emails? I suspect the email in question was sent as an attachment from word and error classes are word's doing and not of graph/outlook-api.Cottontail
Yeah this happens to all emails, I created the email in question as a testBhakti
I'm having the same problem, really pesky. It seems that _(underscore) and ` `(space) are getting omitted. Seems to happen to every mail I try to send with underscores and spaces. When I try to reproduce it it stops happening.Chukar
@reportgunner in the end i changed my replacement placeholders to something like this: [User Name] and [Company Name] that way there are no spelling mistakes and the response is as i'd expect, i'd still prefer a way of disabling the spell check though.Bhakti
D
0

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
Divertissement answered 8/12, 2018 at 17:24 Comment(2)
sorry, did you mean 'untick Always check spelling before sending' ?Chukar
also, what should be the values of the said registry keys ? OutlookSpellingOptions is 2 for meChukar

© 2022 - 2025 — McMap. All rights reserved.