Office.EmailUser interface

表示 Exchange Server 上的电子邮件帐户。

EmailUser 对象主要在从 Outlook 项目中提取的 MeetingSuggestionTaskSuggestion 实体中接收。 若要了解有关此方案的详细信息,请参阅 从 Outlook 项目中提取实体字符串。

注解

最低权限级别读取项

适用的 Outlook 模式:读取

示例

// The following example is an excerpt from a larger sample.
// For the full sample, visit https://learn.microsoft.com/office/dev/add-ins/outlook/extract-entity-strings-from-an-item.

// Gets instances of the task suggestion entity on the item.
function myGetTaskSuggestions()
{
    let htmlText = "";

    // Gets an array of TaskSuggestion objects, each array element 
    // containing an instance of a task suggestion entity from 
    // the current item.
    const tasksArray = _MyEntities.taskSuggestions;

    // Iterates through each instance of a task suggestion.
    for (let i = 0; i < tasksArray.length; i++)
    {
        // Gets the string that was identified as a task suggestion.
        htmlText += "TaskString : <span>" + 
        tasksArray[i].taskString + "</span><br/>";

        // Gets an array of assignees for that instance of a task 
        // suggestion. Each assignee is represented by an 
        // EmailUser object.
        let assigneesArray = tasksArray[i].assignees;
        for (let j = 0; j < assigneesArray.length; j++)
        {
            htmlText += "Assignee : ( ";
            // Gets the displayName property of the assignee.
            htmlText += "displayName = <span>" + assigneesArray[j].displayName + 
            "</span> , ";

            // Gets the emailAddress property of each assignee.
            // This is the SMTP address of the assignee.
            htmlText += "emailAddress = <span>" + assigneesArray[j].emailAddress + 
                "</span>";

            htmlText += " )<br/>";
        }

        htmlText += "<hr/>";
    }

    document.getElementById("entities_box").innerHTML = htmlText;
}

属性

displayName

获取与电子邮件地址关联的显示名称。

emailAddress

获取 SMTP 电子邮件地址。

属性详细信息

displayName

获取与电子邮件地址关联的显示名称。

displayName: string;

属性值

string

emailAddress

获取 SMTP 电子邮件地址。

emailAddress: string;

属性值

string