SMTP email - using variables for the To field
Posted on 2014-04-01
Not sure if this is doable, but it seems so theoretically.
I want to trigger an email on a button click - that much I can do already.
However based on the identity of the user clicking the button ( whose identity is stored as a session variable) I need to vary the 'To' field.
So is there a way to set the MailMessage.From based on the userid stored in my session?