+ Start a Discussion

changing from email in apex code

I want to be able to change the from email in apex depending on some different scenarios. Salesforce pulls the from email out of my personal settings , so it doesnt look like I can set this in code.. Does any one know of a way to do this?