S
Scott Natwick
I'm trying to send an email from a Form. Here's what I have so far:
MailMessage mail = new MailMessage();
mail.To = "(e-mail address removed)";
mail.From = "(e-mail address removed)";
mail.Subject = "this is a test email.";
mail.Body = "Line 1";
mail.Body += "Line 2";
mail.Body += "Line 3";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1"); //basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "my_username_here"); //set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "super_secret"); //set your password here SmtpMail.SmtpServer = "mail.mycompany.com"; //your real server goes here SmtpMail.Send( mail );The example is from here:http://systemwebmail.com/faq/3.8.aspxThe email sends and arrives successfully, however, I need to format themessage. I would like Line 1, Line 2, and Line 3 to be separate paragraphs.Any ideas how to do this?I have searched and found this:Carriage return character (U+000D)Line feed character (U+000A)Carriage return character (U+000D) followed by line feed character (U+000A)Line separator character (U+2028) Paragraph separator character (U+2029)But I don't know if this is what I'm looking for or how to use it.Thanks in advance,Scott Natwick
MailMessage mail = new MailMessage();
mail.To = "(e-mail address removed)";
mail.From = "(e-mail address removed)";
mail.Subject = "this is a test email.";
mail.Body = "Line 1";
mail.Body += "Line 2";
mail.Body += "Line 3";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1"); //basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "my_username_here"); //set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "super_secret"); //set your password here SmtpMail.SmtpServer = "mail.mycompany.com"; //your real server goes here SmtpMail.Send( mail );The example is from here:http://systemwebmail.com/faq/3.8.aspxThe email sends and arrives successfully, however, I need to format themessage. I would like Line 1, Line 2, and Line 3 to be separate paragraphs.Any ideas how to do this?I have searched and found this:Carriage return character (U+000D)Line feed character (U+000A)Carriage return character (U+000D) followed by line feed character (U+000A)Line separator character (U+2028) Paragraph separator character (U+2029)But I don't know if this is what I'm looking for or how to use it.Thanks in advance,Scott Natwick