I have an application that allows you to enter recipes into a SQL DB. It also allows you to send them to a friend. Something is preventing some of the emails from being sent correctly. This has happened when the recipe was written in Word and pasted into the application's multiline text box. It also happened when doing a screen copy of another online recipe. Do I need to do some form of encoding to handle special characters in the mail message?
My code:
string strFrom = "xxxx.xxxx@gmail.com";
string strTo = "xxxxx.xxxxxx@gmail.com";
MailMessage objMM = new MailMessage(strFrom, strTo);
objMM.IsBodyHtml = false;
objMM.Priority = MailPriority.Normal;
StringBuilder sb = new StringBuilder();
if (this.tbMessage.Text.Length > 0)
sb.Append(this.tbMessage.Text + Environment.NewLine);
//Recipe myrecipe = new Recipe(int.Parse((string)Session["RecipeI ...
Go to the complete details ...