function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vin.Vin. 

Lead email address auto populated on the email action.

Hi,

I am a new Admin and currently learning how to use VisualForce.

I would like to auto populate the email address of my leads directly into the "to" in the Email Action so that when my sales reps want to send an email to a lead, the elads email address is already generated as a recipient. 

I assume it is done with VisualForce but I don't know how exactly, could someone assist on this?

Thanks. 
Hayley Dyer 16Hayley Dyer 16
So here's an example of one i've done that works very well. Click New Button, Detail Page Button or whichever you're looking for and URL

/_ui/core/email/author/EmailAuthor? 
p3_lkid={!Job_Applicant__c.Id}& 
template_id=00X0O000001aCXh& 
p6={!Job_Applicant__c.Job_on_JobApplicant__c}& 
p5=& 
p2_lkid={!Job_Applicant__c.CandidateId__c}& 
retURL={!Job_Applicant__c.Id}

Explanation for each:
p3_lkid – Related To Object
retURL – Return URL if cancel is pressed
p2_lkid – To (Contact or Lead ID) 
p4 – CC
p5 – BCC
p6 – Subject
p23- Email Body
p24 – Additional To
template_id – Salesforce Email Template ID
save=1 - to send email without reviewing

Hope that helps