jstedfast / MailKit

A cross-platform .NET library for IMAP, POP3, and SMTP.

Home Page:http://www.mimekit.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle Envelope-to header

vladtreny opened this issue · comments

Does this lib include Envelope-to header in message.To array?
Return-path: <>
Envelope-to: email@exmaple.com
Delivery-date:

No, the MimeMessage.To property only includes the To header.

You can get the list of addresses in the Envelope-To header this way:

int index = message.Headers.IndexOf(HeaderId.EnvelopeTo);
if (index >= 0) {
    var addrList = InternetAddressList.Parse(message.Headers[index].RawValue);
}