Office.EmailUser interface
Represents an email account on an Exchange Server.
EmailUser
objects are primarily received in MeetingSuggestion and TaskSuggestion entities extracted from an Outlook item. To learn more about this scenario, refer to Extract entity strings from an Outlook item.
Remarks
Minimum permission level: read item
Applicable Outlook mode: Read
Examples
// 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;
}
Properties
display |
Gets the display name associated with an email address. |
email |
Gets the SMTP email address. |
Property Details
displayName
Gets the display name associated with an email address.
displayName: string;
Property Value
string
emailAddress
Gets the SMTP email address.
emailAddress: string;
Property Value
string
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for