I am invoking the following code:
public static void SendMessage(string sender, string recipient,string subject,string body)
{
var message = new MailMessage(sender, recipient, subject, body);
开发者_如何学Python _smtpClient.Send(message);
}
There are line breaks a.k.a. Environment.NewLine in the body of the message, but when I open the message in Outlook, they are not there. What am I missing?
Do you see the "Extra line breaks in this message were removed." message underneath the sender's address in message window?
If so, click the "Extra line breaks" message and select "Restore line breaks."
精彩评论