# Getting SMTP Email profiles for a drop down?

**URL:** <https://forum.inductiveautomation.com/t/getting-smtp-email-profiles-for-a-drop-down/35254>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [June 2, 2020, 1:57pm UTC](https://forum.inductiveautomation.com/t/getting-smtp-email-profiles-for-a-drop-down/35254 "2020-06-02T13:57:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [June 2, 2020, 1:57pm UTC](https://forum.inductiveautomation.com/t/getting-smtp-email-profiles-for-a-drop-down/35254/1 "2020-06-02T13:57:40Z")

</div>

I have a email window that has a dropdown that lets the user select who is sending an email. Previously, all our email credential info was in the databse. Now, we have moved it to the SMTP Email Profile part of our gateway. Is there a way to populate my dropdown directly from our SMTP profiles? Or will I need a db table that lines up with what I have?

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [June 2, 2020, 9:42pm UTC](https://forum.inductiveautomation.com/t/getting-smtp-email-profiles-for-a-drop-down/35254/2 "2020-06-02T21:42:35Z")

</div>

That would be a really useful scripting function. You might want to suggest it at [ideas.inductiveautomation.com](http://ideas.inductiveautomation.com)

---

<div class="post-metadata">

**Author:** ![Mehdi\_MECHEDAL](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@Mehdi\_MECHEDAL](https://forum.inductiveautomation.com/u/Mehdi_MECHEDAL)\
**Post date:** [June 3, 2025, 1:35pm UTC](https://forum.inductiveautomation.com/t/getting-smtp-email-profiles-for-a-drop-down/35254/3 "2025-06-03T13:35:13Z")

</div>

Hello,

You can use the following solution:

```python
def getEmailSenderFromSMTPProfiles():
	options = []

	from com.inductiveautomation.ignition.gateway import IgnitionGateway
	emailProfileManager = IgnitionGateway.get().getEmailProfileManager()
	emailProfiles = emailProfileManager.getProfiles()
	
	for emailProfile in emailProfiles:
		email = emailProfile.getProfile().getAuthCredential().getUsername()
		options.append({
			"value": email,
			"label": email		
		})
	return options

```

For more information: [SmtpEmailProfile - Inductive Automation Docs](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.36/com/inductiveautomation/ignition/gateway/mail/SmtpEmailProfile.html)
