Returns a string representation of the formatted EmailMessage
A string representation of the formatted EmailMessage
[C#]
EmailMessage msg = new EmailMessage( "mail.myCompany.com");
msg.FromAddress = "me@myCompany.com";
msg.To = "You@YourCompany.com";
msg.Subject = "test email";
msg.Body = "enter your body contents here...";
//convert the email message to a string, and save to sql server
string contents = msg.ToString();
//a method that saves to sql server
SaveToSql( contents );
[VB.NET]
Dim msg As New EmailMessage("mail.myCompany.com")
msg.FromAddress = "me@myCompany.com"
msg.To = "You@YourCompany.com"
msg.Subject = "test email"
msg.Body = "enter your body contents here..."
'convert the email message to a string, and save to sql server
Dim contents As String = msg.ToString()
'a method that saves to sql server
SaveToSql(contents)