Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0ASP.NET4.0
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 29-May-12 21:41pm
Edited 30-May-12 0:52am
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

  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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Take Html Page and Image folder and css File in One folder Convert that folder to rar or winzip and send the Attachment
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Guruprasad.K.Basavaraju 424
1 Sergey Alexandrovich Kryukov 326
2 Shai Vashdi 318
3 OriginalGriff 265
4 Abhinav S 160
0 Sergey Alexandrovich Kryukov 9,169
1 OriginalGriff 5,290
2 Peter Leow 4,020
3 Maciej Los 3,535
4 Abhinav S 3,263


Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 30 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid