MailKit: How to get the To email address when it is an alias

余生长醉 提交于 2019-12-10 18:52:20

问题


I am sending an email to alias@company.com which is an alias to a real mailbox address. I then connect to the real mailbox (let's say realmailbox@company.com) using MailKit and retrieve messages. When I inspect the To address, all I see is the realmailbox@company.com. How to I see the original alias address that the email was sent to?

For example:

var fullMessage = imapClient.Inbox.GetMessage(uid);
var recipients = fullMessage.To;

recipients only show the realmailbox@company.com, not the alias@company.com.


回答1:


It sounds to me like your SMTP server is performing a string substitution on the alias before passing it along to the recipient mailbox making it impossible to get the info you are looking for.



来源:https://stackoverflow.com/questions/43881516/mailkit-how-to-get-the-to-email-address-when-it-is-an-alias

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!