C# ews 发件人地址
我正在尝试获取有关电子邮件的特定信息(messageID、mailboxname、date、from、to、subject、body、seq、date_inserted_db、hasattachment),我可以使用 item.whatever 方法或使用 emailMessage 成功获取它们像 如何获取电子邮件的发件人在 EWS MAPI 中?。我怎样才能获得发件人的实际电子邮件地址?
EmailMessage mes = (EmailMessage)item;
String sender = mes.Sender.Name;
这给了我类似“toosweetnitemare”的东西,而不是 [电子邮件受保护]。我也尝试过
System.Web.Mail.MailMessage receivedMessage = GetMail();
string replyTo = receivedMessage.From;
,但这对我的代码来说效果不佳,并一直告诉我更改我的框架版本。奇怪,我不想使用它。
我想要使用 EWS 或强制转换来获取地址。有什么想法吗?
I am trying to get specific information about an email (messageID, mailboxname, date, from, to, subject, body, seq, date_inserted_db, hasattachment) and I can successfully get them using either the item.whatever method or using emailMessage to cast the item like shown in How to get the sender of an e-mail in EWS MAPI?. How can i get the actually email address of the sender?
EmailMessage mes = (EmailMessage)item;
String sender = mes.Sender.Name;
This gives me something like "toosweetnitemare" instead of [email protected]. I have also tried
System.Web.Mail.MailMessage receivedMessage = GetMail();
string replyTo = receivedMessage.From;
But that wouldnt play nice with my code and kept telling me to change my framework version. Strange and I dont want to use it.
I want the address using either EWS or casting. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能正在寻找
You're probably looking for