CodingInCircles
CodingInCircles

Reputation: 2807

Using HTML tags in the Email body while composing a mail in VB.Net to be sent via Outlook

I am sending an email through Outlook using VB.Net code.

The syntax for creating the body of the message is: oMsg.Body="string here"

However, the message I am sending is more like: oMsg.Body="Dear" & <database value> & ", you need to pay up" & <database value>

I would like to change the color of the line of text and so used oMsg.HTMLBody, as I had seen elsewhere that we can use HTML tags to format the text. When I used the <font> tag, it didn't even recognise it, but when I used <br> and <p>, it immediately recognised and applied the tags as well.

What could I be doing wrong? How can I apply the tag to include the database values as well? Please let me know. Thanks!

Upvotes: 0

Views: 1514

Answers (1)

cdeszaq
cdeszaq

Reputation: 31280

<font> is deprecated. Use style attributes on your tags instead to style them different ways.

Upvotes: 1

Related Questions