Hi,
I just tried to compare my code which loads a multi contact vcf and save as a DistList msg versus MapiDistributionList.FromVCF.
Using your function, there are contacts that are not saved into the resulting msg:
DistrobutionList.txt attachment, see the comparison:
Bug.jpg (180.5 KB)
Bug 1: Total 6 contacts are NOT saved into the resulting msg/oft DistList at all.
But 2: For one contact, VCardContact.IdentificationInfo.FullName.HonorificPrefixes is not saved, strange!
I am attaching my code so you can test, compare with MapiDistributionList.FromVCF and fix it.
Thanks for your kind attention.
- Attached source code updated:
Code.zip (886 Bytes)
@australian.dev.nerds,
We’ll review the issue and compare your implementation with MapiDistributionList.FromVCF as you suggested. Could you please also share the original VCF file you used for testing?
1 Like
Hello and thanks for your kind support,
Sorry my bad, forgot it:
Multi.zip (396.5 KB)
Hi,
Thank you for the vcf file provided.
It looks like your implementation reads all EMAIL
fields within a single contact block — for example, in the following (1st) vCard:
BEGIN:VCARD
VERSION:2.1
N:;Admin
FN:Admin
EMAIL;INTERNET:info@hayedehmusic.com
EMAIL;INTERNET:aust.dev.nerd@gmail.com
EMAIL;INTERNET:australian.dev.nerds@gmail.com
END:VCARD
Your code appears to treat all EMAIL
entries as separate contacts, but in fact, these are multiple email addresses for one contact (Admin).
Let us know if that matches what you’re seeing.
Are you aiming to include each email as a separate member in the distribution list, even if they belong to the same vCard?
1 Like
Hello and thanks, 1st this item marked in green:
Bug2.jpg (333.1 KB)
You can see MapiDistributionList.FromVCF does not import one prefix here.
And about reading all EMAIL fields within a single contact block:
Because Mapi DistList just holds name and email address, so I assume for this specific conversion the vital information is email, so yes, I read all emails.
Please note that I didn’t read the related RFCs and am not sure if there are any straight instructions for this or not, but I don’t think so…
(Just my thought, I think it makes the most sense, but it’s your decision)
We extract the display name from the FN field, and in this particular vcard, the FN value does not include a prefix.
We use the FN field because it represents the full display name exactly as the contact should appear to the user. According to the vCard specification, FN is the only required name field, and it is intended to reflect the preferred presentation of the name, including any titles or suffixes if they are present. The N field contains structured name parts, but FN is typically used for display purposes when creating distribution list members.
1 Like
Thanks so much for the valuable information, just how to access the FN field, is this correct?
VCardContact.IdentificationInfo.FullName
Actually, to access the FN
field, you should use:
VCardContact.IdentificationInfo.DisplayName
This property corresponds to the Formatted Name (FN) field in the vCard.