开发者

MailMessage ignoring my line breaks

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."

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜