This is what I do:
MailMessage mail = new MailMessage(from, to, subject, message);
mail.IsBodyHtml = true;
SmtpClient client = new SmtpClient("localhost");
client.Send(mail);
Note that I set the mail message html to true: mail.IsBodyHtml = true;
More Related Contents:
- Why do I get “‘property cannot be assigned” when sending an SMTP email?
- How to send email in ASP.NET C#
- Can I test SmtpClient before calling client.Send()?
- Can I set up HTML/Email Templates with ASP.NET?
- SmtpClient: A connection attempt failed because the connected party did not properly respond after a period of time
- System.Net.Mail creating invalid emails and eml files? Inserting extra dots in host names
- Amazon SES Email address is not verified
- Passing data from one desktop/web application to another desktop app
- c# asp.net delete last comma [closed]
- Finding the variable name passed to a function
- The name ‘controlname’ does not exist in the current context
- Sharing sessions across applications using the ASP.NET Session State Service
- Entity Framework Timeouts
- Read SQL Table into C# DataTable
- Plus sign in query string
- If a folder does not exist, create it
- Visual Studio 2015 not syntax highlighting razor nor Intellisense
- System.Web.HttpContext.Current.User.Identity.Name Vs System.Environment.UserName in ASP.NET
- The request was aborted: Could not create SSL/TLS secure channel
- How can I add option groups in ASP.NET drop down list?
- How to open Outlook new mail window c#
- Top level domain from URL in C#
- Get Row Index on Asp.net Rowcommand event
- Can I check if an email address exists using .net?
- onchange event for html.dropdownlist
- How do I inject ASP.NET 5 (vNext) user-secrets into my own utility class?
- Select multiple fields group by and sum
- How to return XML in ASP.NET?
- iTextSharp international text
- LINQ to Entities does not recognize the method ‘System.String ToString()’ method in MVC 4