I have found this link which is very close to what I am trying to achieve but with no luck for me so far.
I have email variables and other configuration set up in my