Try changing the following line from:
- Code: Select all
mail.BodyFormat = MailFormat.Text
to
- Code: Select all
mail.BodyFormat = Mail.MailFormat.HTML ' for HTML formatted email
or
- Code: Select all
mail.BodyFormat = Nothing ' for plaintext or just comment out
If the users are selecting the mail format, use a dropdown or radio in your presentation and then in your codebehind use a "select case" or "if.. else.." to handle the condition.
HTH