How to create a multi line body in C# System.Net.Mail.MailMessage

前端 未结 14 659
忘了有多久
忘了有多久 2020-12-03 02:45

If create the body property as

System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();

message.Body =\"First Line \\n second line\";
         


        
14条回答
  •  再見小時候
    2020-12-03 03:07

    Something that worked for me was simply separating data with a :

    message.Body = FirstLine + ":" + SecondLine;

    I hope this helps

提交回复
热议问题