Click here to Skip to main content
15,897,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I need to create a news letter and send it via email. I know how to send simple text messages via email but I need the news letter email to be in HTML format with styles and stuff, pretty much like the code project news letter. I already have template for the news letter and I need a way to pass values to the template and how to send that HTML document via email.
Posted

1 solution

Using the MailMessage class set the property IsBodyHtml = true then include the html as the message body, perhaps using string.format to add dynamic values to it where required.
 
Share this answer
 
Comments
obhasha07 18-May-11 21:55pm    
Thanks for the answer. Is it possible to do using Outlook? I'm using outlook to send emails via .net
[no name] 18-May-11 22:07pm    
You mean you are using the Office Interop to create an instance of Outlook to send emails? You are using the most difficult method to accomplish a simple task. Please read this documentation http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900