How to send HTML-formatted email?
Setting isBodyHtml
to true
allows you to use HTML tags in the message body:
msg = new MailMessage("xxxx@gmail.com",
"yyyy@gmail.com", "Message from PSSP System",
"This email sent by the PSSP system<br />" +
"<b>this is bold text!</b>");
msg.IsBodyHtml = true;
Generate HTML Email with .NET
Because there's no designation of IsBodyHTML
set to true when using the Send function the way you've done. I think IsBodyHTML
is within the MailMessage
object.
I'm not entirely sure what IsBodyHTML
sets in the body but it may create fully formed HTML (<html><head><body>etc....
) so maybe give that a try.
Related Topics
Programmatically Set Browser Proxy Settings in C#
How to Ensure a Form Displays on the "Additional" Monitor in a Dual Monitor Scenario
Change Sender Address When Sending Mail Through Gmail in C#
How to Treat the Circle as a Control After Drawing It? - Moving and Selecting Shapes
Creating Wcf Channelfactory<T>
Comparing Strings with Tolerance
How to Find the Extension of a File in C#
How to Remove All White Space from the Beginning or End of a String
What Is Relation Between Gc, Finalize() and Dispose
Regex to Get Number Only from String
How to Use Use Late Binding to Get Excel Instance
Cancelling a Pending Task Synchronously on the UI Thread
How to Restrict/Control the Navigation Routes the User Can Visit Based on Login Status/Role
Test If String Is a Guid Without Throwing Exceptions