You can turn off spell checking for specific sections of text, such as code. These instructions are for Outlook 2013.
Select the text for which you want spell checking turned off
Display the Review tab of the ribbon
Click on Language then Set Proofing Language
The Language dialog box pops up
Select Do not check spelling or grammar
Click on OK
This removes the red squiggly lines from your code, but keeps checking spelling for the rest of your document.