MailMessage sent string as body without newline in outlook

前端 未结 10 837
挽巷
挽巷 2020-12-11 15:44

HI, I am trying to send a simple notification using system.net.mail.mailmessage. I just pass the string as the message body. But problem is even though multi-line message be

10条回答
  •  天涯浪人
    2020-12-11 16:31

    This worked for me:

        mail.Body = String.Format(@"Some text here:
    A new line here  
    And another line here");
    

    Just be careful to not indent on the 2nd and 3rd line.

提交回复
热议问题