Office.EmailAddressDetails interface
電子メール メッセージまたは予定の送信者または指定受信者の電子メール プロパティを提供します。
注釈
最小アクセス許可レベル: 項目の読み取り
適用可能な Outlook モード: Composeまたは読み取り
使用元
- Office.AppointmentForm: optionalAttendees, requiredAttendees
- Office.AppointmentRead: optionalAttendees, 開催者, requiredAttendees
- Office.From: getAsync
- Office.LoadedMessageRead: cc、 from、 sender、 to
- Office.MessageForm: bccRecipients, ccRecipients, toRecipients
- Office.MessageRead: cc, from, sender, to
- Office.Organizer: getAsync
- Office.Recipients: addAsync、 getAsync、 setAsync
プロパティ
| appointment |
予定に対して出席者が戻した応答を取得します。 このプロパティは、 |
| display |
電子メール アドレスに関連付けられた表示名を取得します。 |
| email |
SMTP 電子メール アドレスを取得します。 |
| recipient |
受信者の電子メール アドレスの種類を取得します。 |
プロパティの詳細
appointmentResponse
予定に対して出席者が戻した応答を取得します。 このプロパティは、optionalAttendees プロパティまたは requiredAttendees プロパティで表わされる予定の出席者にのみ適用されます。 このプロパティは、他のシナリオでは未定義を返します。
appointmentResponse: MailboxEnums.ResponseType | string;
プロパティ値
Office.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.MailboxEnums.RecipientType | string
注釈
重要:
recipientTypeプロパティ値は、Office.context.mailbox.item.from.getAsync メソッドと Office.context.mailbox.item.organizer.getAsync メソッドでは返されません。 電子メールの送信者または予定の主催者は、常に電子メール アドレスが Exchange サーバー上にあるユーザーです。メール アイテムの作成中に、以前に選択した差出人アカウントとは異なるドメインの差出人アカウントに切り替えると、既存の受信者の
recipientTypeプロパティの値は更新されず、以前に選択したアカウントのドメインに基づきます。 アカウントの切り替え後に正しい受信者の種類を取得するには、まず既存の受信者を削除してから、メール アイテムに追加し直す必要があります。
例
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);
});