+ Start a Discussion
Hema SudeepaHema Sudeepa 

Is it possible to set From address using apex code?

Hi All,

I need to send an email to user. In salesforce usually from address will be the logged in user. Is it possible to set FROM address using apex code.

Please let me know the possible solution.

Thanks!

surasura
In salesforce you cant set sender using apex code . It defaults to the logged in users mail address. One possible workaround is to use org wide email addresses
https://help.salesforce.com/apex/HTViewHelpDoc?id=orgwide_email.htm