Office.MailboxEnums.RecipientType enum
メッセージまたは予定の受信者の種類を指定します。
注釈
適用可能な Outlook モード: Composeまたは読み取り
重要: Office.context.mailbox.item.from.getAsync メソッドと Office.context.mailbox.item.organizer.getAsync メソッドでは recipientType プロパティ値は返されません。 電子メールの送信者または予定の主催者は、常に電子メール アドレスが Exchange サーバー上にあるユーザーです。
使用元
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/30-recipients-and-attendees/get-to-message-read.yaml
const msgTo = Office.context.mailbox.item.to;
const distributionLists = [];
const externalRecipients = [];
const internalRecipients = [];
const otherRecipients = [];
for (let i = 0; i < msgTo.length; i++) {
switch (msgTo[i].recipientType) {
case Office.MailboxEnums.RecipientType.DistributionList:
distributionLists.push(msgTo[i]);
break;
case Office.MailboxEnums.RecipientType.ExternalUser:
externalRecipients.push(msgTo[i]);
break;
case Office.MailboxEnums.RecipientType.User:
internalRecipients.push(msgTo[i]);
break;
case Office.MailboxEnums.RecipientType.Other:
otherRecipients.push(msgTo[i]);
}
}
if (distributionLists.length > 0) {
console.log("Distribution Lists:");
distributionLists.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`));
}
if (externalRecipients.length > 0) {
console.log("External Recipients:");
externalRecipients.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`));
}
if (internalRecipients.length > 0) {
console.log("Internal Recipients:");
internalRecipients.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`));
}
if (otherRecipients.length > 0) {
console.log("Other Recipients:");
otherRecipients.forEach((recipient) => console.log(`${recipient.displayName}, ${recipient.emailAddress}`));
}
フィールド
| DistributionList = "distributionList" | 受信者が電子メール アドレスのリストを含む配布リストであることを指定します。 |
| User = "user" | 受信者が Exchange サーバーの SMTP 電子メール アドレスであることを指定します。 |
| ExternalUser = "externalUser" | 受信者が Exchange サーバー上にない SMTP 電子メール アドレスであることを指定します。 また、個人用 Outlook アドレス帳から追加された受信者も指します。 重要: Outlook on the web、Windows (新しいものと従来の (バージョン 2210、ビルド 15813.20002 以降))、および Mac では、個人用アドレス帳に保存されたグローバル アドレス帳 (GAL) の受信者が、SMTP 電子メール アドレスが Exchange サーバーに表示されていても、 |
| Other = "other" | 受信者が他の受信者のタイプではないことを指定します。 また、Exchange アドレス帳に対して解決されていない受信者も指すため、外部 SMTP アドレスとして扱われます。
重要: Android 版および iOS 版の Outlook では、個人用アドレス帳に保存されたグローバル アドレス帳 (GAL) の受信者は、SMTP メール アドレスが Exchange サーバーに表示されていても、 |