Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I would like to make a style HTML page as the body of an email, and send it using C#. How can I do this?
Posted
Updated 30-May-12 0:52am
v3

This is how i would do it:

1. Use stringbuilder to tailor your HTML line by line.
2. send this stringbuilder.tostring() as the email body.
3. Make sure to set the message.IsBodyHtml = true; where message is MailMessage object.
 
Share this answer
 

  1. Read here about the MHTML[^] standard.
  2. Here's an article on how to send email here on CP:C# Code snippet to send an Email with attachment from Outlook, Yahoo, HotMail, AOL and Gmail[^]


Make sure to honor hint 3. from Rahul Rajat Singh's[^] solution above.

Regards,

Manfred
 
Share this answer
 
Take Html Page and Image folder and css File in One folder Convert that folder to rar or winzip and send the Attachment
 
Share this answer
 

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