Click here to Skip to main content
15,894,740 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Everyone,

i am using microsoft outlook2010 for sending email's.Now my requirement is to create a email body with table format using windows application.

i am able to create the same in web application. but i am not getting in
the windows application.

kindly anyone help me how to do it.

thanking you,
Posted

You Can Simply Create String Representation of html and then can set MailMessage.IsBodyHtml property to true and content property to this equivalent string representation

like below

C#
string HtmlMessage=@"<html><table><th>hello</th><tr></tr></table>></html>" 

C#
mail.Body=HtmlMessage;
C#
mail.IsBodyHtml=true;
 
Share this answer
 
v3
Comments
Bitto kumar 29-Sep-14 12:15pm    
hi ashok. i am not finding the IsbodyHtml property in windows application.
ashok rathod 29-Sep-14 22:53pm    
which particular class you are using for mail ? System.Net.Mail.MailMessage class has IsBodyHtml property
Bitto kumar 30-Sep-14 4:36am    
thank you so much..it's working
ashok rathod 30-Sep-14 4:38am    
your welcome Bitto kumar .
If you are having WPF application then you can definitely create that by using Grid object.
 
Share this answer
 
Comments
Bitto kumar 29-Sep-14 6:22am    
But i am using windows application. is there any other solution?

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