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

Visual force Email Template to overwrite / populate the "To" field.
Can I built a VF Email Template where the "To" field can populated or overwritten?
The Email will be sent out from the Lead level, and as you know be default the "To" field displays the Lead Name.
There is a lookup to Contact custom field in the LEAD, and when the VFTemplate is selected the "To" field should be overwritten to that Contact Name which is already selected on the LEAD.
Can this be done?
Hi
Check here
http://wiki.developerforce.com/page/VisualForceEmailTemplates_sample
This is not helpful.
This example is a basic way to create VF Email Template. I get that!
I am asking, how can I overwrite or populate the "TO' section of the Email. ???
The problem is that some of the contacts will have an alternate address. And when a checkbox 'use alternate address' is set, it should email ONLY their alternate address, not the address that is in the standard 'email' field.
I can't figure out a way to override the To address when setting mail.setTargetObjectId(<Contact ID>).
Did you ever figure this out, Sudha76?