ContactInformation.Emails | emails property
A read-only list of email addresses stored with the contact.
Syntax
var emails = contactInformation.emails;
Property value
Type: IVectorView<ContactField> [JavaScript/C++] | System.Collections.Generic.IReadOnlyList<ContactField> [.NET]
A read-only list of email addresses.
Remarks
Use the Emails property to access a contact's email addresses from a ContactInformation object.
Examples
This code demonstrates the use of the Emails property.
function selectKnownFields() { var picker = Windows.ApplicationModel.Contacts.ContactPicker(); picker.commitButtonText = "Select"; picker.selectionMode = Windows.ApplicationModel.Contacts.ContactSelectionMode.fields; picker.desiredFields.append(Windows.ApplicationModel.Contacts.KnownContactField.email); picker.pickSingleContactAsync().then(function (contact) { var contactElement = document.createElement("div"); var contactData = contact.name + ", "; contactData += contact.emails[0].value + ", "; contactElement.innerText = contactData; document.body.appendChild(contactElement); }); }
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012
