Edit

Share via


Office.EmailUser interface

Represents an email account on an Exchange Server.

Remarks

Minimum permission level: read item

Applicable Outlook mode: Read

Examples

TypeScript
// Add recipients to the To field of an email.
const recipients: Office.EmailUser[] = [
    {
        "displayName": "Allie Bellew",
        "emailAddress": "allieb@contoso.com"
    },
    {
        "displayName": "Alex Darrow",
        "emailAddress": "alexd@contoso.com"
    }
];

Office.context.mailbox.item.to.addAsync(recipients, (result) => {
    if (result.status === Office.AsyncResultStatus.Failed) {
        console.log(result.error.message);
        return;
    }

    console.log("Recipients added to the To field.");
});

Properties

displayName

Gets the display name associated with an email address.

emailAddress

Gets the SMTP email address.

Property Details

displayName

Gets the display name associated with an email address.

TypeScript
displayName: string;

Property Value

string

emailAddress

Gets the SMTP email address.

TypeScript
emailAddress: string;

Property Value

string