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?

Owen Pattison
  • 314
  • 2
  • 6
  • 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. – Dipen Shah Dec 03 '18 at 18:49
  • Yeah this happens to all emails, I created the email in question as a test – Owen Pattison Dec 04 '18 at 09:01
  • 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. –  Feb 18 '19 at 12:27
  • @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. – Owen Pattison Feb 19 '19 at 13:44

1 Answers1

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
  • sorry, did you mean 'untick `Always check spelling before sending`' ? –  Feb 18 '19 at 12:28
  • also, what should be the values of the said registry keys ? `OutlookSpellingOptions` is 2 for me –  Feb 18 '19 at 12:29