MailMessage sent string as body without newline in outlook

前端 未结 10 849
挽巷
挽巷 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:37

    Set the IsBodyHTML to false:

    ms.IsBodyHtml = false;

    By default it is false but it appears you have set it to true somewhere as outlook thinks it is HTML.

提交回复
热议问题