Send SMTP Mail Message - get Username

Hi all.

Hope all is doing well.

I have a process sending Email notifications using -Send SMTP Mail Message- so I saw one of the properties actually provides either the ‘Name’ or ‘From’ but to get one of those values?

image

Also, on the ‘Logon’ section I’m providing the ‘Email’ and ‘Password’ obtained from Orchestrator as an ‘Asset’ in order to use the SMTP but, once you have provided the right credentials for that Email account, I was just wondering if this activity could actually retrieve the ‘Username’ and use it on the ‘Sender’ section as the ‘Name/From’ property?

image

Thx for any thoughts in advanced…

Hey you can get this via powershell

1 Like

These are just string fields. You can literally put anything in them. You can even put in a fake email address (in From) and fake name (in Name). We put processname@ourcompany.com into the From, and the process name as the Name. This way we can easily tell which process is sending which emails.

Generally Send SMTP Email doesn’t need Logon info. This is only necessary if your internal SMTP server requires it.

And if yours does, so you’re storing the email address in an Asset, just use that to populate the From. You already have the email address from the Asset…why try to find another way to get it? As for the Name, you could just use AssetEmailVariable.Replace("@ourcompany.com","") to strip off the domain and then the Name field would have just the part before the @.

1 Like