+1 vote

I'm receiving emails via IMAP client in .NET: Why does the To Address only show Vicky.Luangphakdy@example.com when the To address has V.Lu@example.com;RSInvoicing@na.example.com;Vicky.Lu@test.com


1 Answer

0 votes
Best answer

In Mail.dll email library IMail.To is a collection of MailAddress items (IList<MailAddress>). Each item is MailBox or MailGroup instance (both inherit from MailAddress class).

There is just one correct way of specifying multiple addresses in To: email header. It's by using a coma:

To: "Alice" <alice@example.com>, 
 "Bob" <bob@example.com>, tom@example.com

In the above case email's to contains 3 addresses.

Semicolons are not a valid way of splitting multiple emails.
Semicolons are used to finish email groups only. Take a look at this example:

To: "One" <one@example.com>, 
 group1: <g1@group.org>, g2@group.org;, 

In this case email's to contains: an address (one@example.com), a group (named group1) with two addresses (g1, g2), and an address (two@example.com)

Without the original To: header can't really tell more.

by (298k points)