Update RazorPage.cs

So that email can be sent in console application.
Merge pull request #30 from djseng/patch-1

Change to the Encode method so that email can be sent by a console application.