# Get email addresses

**URL:** <https://forum.inductiveautomation.com/t/get-email-addresses/86475>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 27, 2024, 11:43pm UTC](https://forum.inductiveautomation.com/t/get-email-addresses/86475 "2024-02-27T23:43:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrd](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@jrd](https://forum.inductiveautomation.com/u/jrd)\
**Post date:** [February 27, 2024, 11:43pm UTC](https://forum.inductiveautomation.com/t/get-email-addresses/86475/1 "2024-02-27T23:43:21Z")

</div>

Hi  
I would like to build a View to selectively send emails, ie choose recipients by name or role.  
I can use system.users.getUsers, but the list does not include email addresses  
How do I do this?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 27, 2024, 11:50pm UTC](https://forum.inductiveautomation.com/t/get-email-addresses/86475/2 "2024-02-27T23:50:52Z")

</div>

`system.user.getUsers` returns a list of complex `User` objects, which _do_ contain the email address, you just have to work for it a little bit.

E.G. this thread:

> [@Get a list of all first names, last names, and emails out of the active directory using system.user.getUsers()](https://forum.inductiveautomation.com/t/get-a-list-of-all-first-names-last-names-and-emails-out-of-the-active-directory-using-system-user-getusers/79484/7):
>
> Oh yes you're right! It is working perfectly now, I really appreciate it. The final form is: list = [] users = system.user.getUsers("") for user in users: contacts = user.getContactInfo() for contact in contacts: if contact.contactType == "email": email = contact.value first = user.get(user.FirstName) last = user.get(user.LastName) if email is not None and first is not None and last is not None: list.append((first, last, email)) print list
