You need to sign in to do that
Don't have an account?

Problem in email template - apex code
I have created an Email Template and tosend an email using this template:
The from section of the email is: admin@gmail.com.
I want to change the from email id address.
How can I change the From Email Id?
I even changed the Author of the Email Template but still no change.
Can anyone help me? Pls.
How is this related to Apex?
I think you'll need to change your email settings for this.
Go to Personal Setup -> Email -> My Email Settings.
I have written a code to send single email. For this I have used the following
Messaging.SingleEmailMessage email1 = new Messaging.SingleEmailMessage();
to send single email I have created an Email Template. In this email template I have used
<messaging:HtmlEmailBody>
<c:VisualForceComponent></c:VisualForceComponent>
</messaging:HtmlEmailBody>
The email is getting sent. The problem is the email is being sent from ADMIN@gmail.com. I want to change this to abc@gmail.com
How can I do this?