Nolan_Jensen_23
Jun 01, 2017Nimbostratus
APM custom variable to change mail domain
Hello, I am trying to figure out the code for a custom Expression to be used in APM for a variable assign. My goal is to modify session.ad.last.attr.mail from the value that is in active directory username@test.city.state.us to username@testcity.org.
I had found another post that did something like this for parsing but was unable to adapt it to my needs.
foreach address [string tolower [mcget {session.ad.last.attr.mail}]] { if { [scan $address {@test.city.state.us:%s} mail] } { return @testcity.org } }
Appreciate any help you can provide.
Thanks, Nolan