Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi


I Trying below code for

VB
Dim [to] As String = "hello.gmail.com"
Dim cc As String = "hai.gmail.com"

Dim subject As String = Test
 Dim body As String = " this is plan test"

Process.Start(String.Format("mailto:{0}?cc={1}&subject={2}&body={3}", [to], cc, subject, body))



For the Above code in Body how to insert the html code ? I want to display body in Defined desgin Text format...


Please help
Posted
Updated 7-May-15 0:54am
v3
Comments
[no name] 7-May-15 5:59am    
What u have tried? are you trying to attach html table inside the email body ?
Member 11338695 7-May-15 6:13am    
I need color some Text,Make Bold and underline
[no name] 7-May-15 6:16am    
so,you want to design the body content.
Member 11338695 7-May-15 6:20am    
Yes
[no name] 7-May-15 6:49am    
k,i just post one example here.it's contain html table design in string "mailbodyUser".

1 solution

Hi,

Try this..

Example :
C#
string Subject = "Hai";
string Priority = "First";
string status = "Yes";
string linkuser = "http://www.codeproject.com/";

string mailbodyUser = BodydetailsUser + "<br><br><br>" + "<body style='margin: 0; padding: 0;'> <table  align='center' cellpadding='5' cellspacing='0' width='600px' style='border: 1px solid #DDD;border-collapse: collapse;'><tr><td colspan='2' bgcolor='#dddddd' style='border: 1px solid #DDD;border-collapse: collapse;'>List Items</td></tr><tr><td style='border: 1px solid #DDD;border-collapse: collapse;'>Subject</td><td style='border: 1px solid #DDD;border-collapse: collapse;'>  " + Subject + "</td></tr><tr><td style='border: 1px solid #DDD;border-collapse: collapse;'>Priority   </td><td style='border: 1px solid #DDD;border-collapse: collapse;'>" + Priority + "</td></tr><tr><td style='border: 1px solid #DDD;border-collapse: collapse;'>Status</td><td style='border: 1px solid #DDD;border-collapse: collapse;'> " + status + "</td></tr></table></body>" + "<br/><br/><br/>You can replay on this ticket at  <a href= " + linkuser + ">Click Here</a>";

message.Body = mailbodyUser;
 
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