+ Start a Discussion
sami amisami ami 

Email templates with from address



I created a email template.For now i hardcoded my from address.But i want the from address should be logged in user.

So how can i do this possible??

I want to give my from address as 

from:loggedin username  <loggedin user email>


Please suggest.



Hi ,


Visit this blog http://www.codespokes.com/2013/08/how-to-send-email-from-apex-code-with.html.


This blog will help you.


If this post helps you than mark it as a solution and don't forget to give me kudo's.




sami amisami ami
Thanks ..But this needs apex coding right?Can we do something from Email templates?
Setup----admin setup----communication Templates---email templates.
Later we are using some workflows to send the email Templates.So.....



If you don't want to code then email template always pick the Organization-Wide Addresses for from address.





If you this post helps you than mark it as solution and don't forget to give me kudo's.


You won't be able to set the From address as the logged-in user under:

Setup----admin setup----communication Templates---email templates


However if you use the templaate in a workflow email alert, you will get an option that you can set as this:

From Email Address Current User's email address


sami amisami ami
i also want to set TO address like opportunity contact roles email address...So for all these i need to create a apex class??