+ Start a Discussion
ItsJustCode999ItsJustCode999 

When you are sending a email from a lead, is there any way to validate or control who the sender email is programmatically?

When you are sending a email from a lead, is there any way to validate or control who the sender email is programmatically?

Thank you,
Steve
Best Answer chosen by ItsJustCode999
Balaji BondarBalaji Bondar
Hi Steve,

1. You can try below approaches: 

Use URL hacking to pass from address.Below is the URL that is used in a custom button to send email template from the Opportunity page. You should be able to replace Opportunity.ID with Case.ID.  The last part of the URL selects the template. You'll have to enter the id of your template.
/_ui/core/email/author/EmailAuthor?rtype=003&p3_lkid={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}&p5={!$User.Email}&p24="lee.moreau@company.com&template_id=00XC0000001O7Ck
2. create custom functionality to send an email using VF & apex.

Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.

All Answers

Balaji BondarBalaji Bondar
Hi Steve,

1. You can try below approaches: 

Use URL hacking to pass from address.Below is the URL that is used in a custom button to send email template from the Opportunity page. You should be able to replace Opportunity.ID with Case.ID.  The last part of the URL selects the template. You'll have to enter the id of your template.
/_ui/core/email/author/EmailAuthor?rtype=003&p3_lkid={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}&p5={!$User.Email}&p24="lee.moreau@company.com&template_id=00XC0000001O7Ck
2. create custom functionality to send an email using VF & apex.

Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.
This was selected as the best answer
ItsJustCode999ItsJustCode999
Thank you very much!  The url hack works perfectly.

Steve
ItsJustCode999ItsJustCode999
Question?  How do you populate the whoid on the email task via a url hack for a template associated with a lead?