Issue
I am developing some program in C# which will send the mail using outlook 2007. For this I wish to create a table in mail body and need to show the required data in it. Can anyone let me know how we can create a table programmatically in mail body.
Solution
Just output the data in a standard HTML table.
Then send it as an HTML email instead of plain text. Here's a quick and dirty example in C#:
MailMessage msg = new MailMessage("From@Email.com", "To@Email.com");
msg.IsBodyHTML = true;
msg.Subject = "Subject line here";
msg.Body = "html goes here";
SmtpClient mailClient = new SmtpClient("YourEmailServer");
mailClient.Send(msg);
Answered By - Neil N Answer Checked By - Marilyn (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.