Get SMTP Profile configurations via code (Ignition 8.1.48)

I need to get the SMTP Profile information from the gateway using the module I’m building, such as:

Hostname, Port, UseSSL/TTLS Port, USE STARTTLS, Username, Password.

Does ignition provides a class I can extend e/or a API to get these specific informations? Thanks!

Why do you need access to the underlying settings? I'd say a better pattern would be to just pass the email message to our managed profile:

From GatewayContext, get the email profile manager:

Then get the profile by name:

Then call the provided sendEmail method:

It is possible to access the underlying settings directly using basically the same approach, but I wouldn't recommend it.

Note that this EmailProfileManager interface was introduced in 8.1.24, so you may have to set a floor for your module's supported Ignition versions/SDK compatibility.