EWS body plain text

后端 未结 5 1270
盖世英雄少女心
盖世英雄少女心 2020-12-05 06:47

I use EWS to get exchange emails, but how can i get plain text from email body, without html?
Now i use this:

EmailMessage item = (EmailMessage)outbox         


        
5条回答
  •  猫巷女王i
    2020-12-05 07:26

    The shortest way to do it is like this:

    item.Load(new PropertySet(BasePropertySet.IdOnly, ItemSchema.TextBody, EmailMessageSchema.Body));
    

    This has got the advantage that you get both, text-body and html-body.

提交回复
热议问题