Office.EmailAddressDetails interface

Предоставляет свойства электронной почты отправителя или указанных получателей сообщения электронной почты или встречи.

Комментарии

Минимальный уровень разрешений: чтение элемента

Применимый режим Outlook: создание или чтение

Свойства

appointmentResponse

Получает ответ, возвращенный участником для встречи. Это свойство применяется только к участнику встречи, представленному свойством optionalAttendees или requiredAttendees. Это свойство возвращает значение undefined в других сценариях.

displayName

Получает отображаемое имя, связанное с адресом электронной почты.

emailAddress

Получает адрес электронной почты SMTP.

recipientType

Получает тип адреса электронной почты получателя.

Сведения о свойстве

appointmentResponse

Получает ответ, возвращенный участником для встречи. Это свойство применяется только к участнику встречи, представленному свойством optionalAttendees или requiredAttendees. Это свойство возвращает значение undefined в других сценариях.

appointmentResponse: MailboxEnums.ResponseType | string;

Значение свойства

Примеры

// The following sample provides the responses from required attendees.
// Note that this sample needs the add-in to be in Appointment Read (Attendee) mode.
const requiredAttendees = Office.context.mailbox.item.requiredAttendees;
console.log("There are " + requiredAttendees.length + " required attendees.")
requiredAttendees.forEach(function (requiredAttendee) {
    console.log("Attendee " + requiredAttendee.displayName + ": " + requiredAttendee.appointmentResponse);
});

displayName

Получает отображаемое имя, связанное с адресом электронной почты.

displayName: string;

Значение свойства

string

Примеры

const organizerName = Office.context.mailbox.item.organizer.displayName;
console.log("Organizer: " + organizerName);

emailAddress

Получает адрес электронной почты SMTP.

emailAddress: string;

Значение свойства

string

Примеры

const organizerAddress = Office.context.mailbox.item.organizer.emailAddress;
console.log("Organizer's email address: " + organizerAddress);

recipientType

Получает тип адреса электронной почты получателя.

recipientType: MailboxEnums.RecipientType | string;

Значение свойства

Комментарии

Важно! Значение свойства не возвращается методами Office.context.mailbox.item.from.getAsync и Office.context.mailbox.item.organizer.getAsync.recipientType Отправитель электронной почты или организатор встречи всегда является пользователем, адрес электронной почты которого находится на сервере Exchange Server.

Примеры

const requiredAttendees = Office.context.mailbox.item.requiredAttendees;
console.log("There are " + requiredAttendees.length + " required attendees.")
requiredAttendees.forEach(function (requiredAttendee) {
    console.log("Attendee " + requiredAttendee.displayName + ": " + requiredAttendee.recipientType);
});