Office.EmailAddressDetails interface

電子メール メッセージまたは予定の送信者または指定受信者の電子メール プロパティを提供します。

注釈

最小アクセス許可レベル: アイテムの読み取り

適用できる Outlook モード: 新規作成または読み取り

プロパティ

appointmentResponse

予定に対して出席者が戻した応答を取得します。 このプロパティは、optionalAttendees プロパティまたは requiredAttendees プロパティで表わされる予定の出席者にのみ適用されます。 このプロパティは、他のシナリオでは未定義を返します。

displayName

電子メール アドレスに関連付けられた表示名を取得します。

emailAddress

SMTP 電子メール アドレスを取得します。

recipientType

受信者の電子メール アドレスの種類を取得します。

プロパティの詳細

appointmentResponse

予定に対して出席者が戻した応答を取得します。 このプロパティは、optionalAttendees プロパティまたは requiredAttendees プロパティで表わされる予定の出席者にのみ適用されます。 このプロパティは、他のシナリオでは未定義を返します。

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;

プロパティ値

注釈

重要: recipientType プロパティ値は、 Office.context.mailbox.item.from.getAsync メソッドと Office.context.mailbox.item.organizer.getAsync メソッドによって返されません。 メール送信者または予定の開催者は、常に Exchange サーバー上のメール アドレスを持つユーザーです。

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);
});