+ Start a Discussion
Jayant DasJayant Das 

Recipient Default Language/Email in a Visualforce Email Template

We have an implementation of visual force email template as mentioned here (https://www.salesforce.com/us/developer/docs/pages/Content/pages_email_templates_creating.htm) which is used as a response to the customer whenever an email to case is created. The current implementation after the case is created sends an email to the Contact record's email in the language set in the custom language field on the Contact.

However if there are no Contact record present, the customer is still getting an email back through the very same template, in that case we are trying to understand how does Salesforce set the recipient email and the language? Any help on this is really appreciated.

It is always set off of the User record
Jayant DasJayant Das
Hi Sumit,

The VF email template uses the Contact record details, however in case of no Contact present in the system, and the scenario being an email to case, there will be no User record associated either.

I assume you are referring to the context user, since after changing the language of the context user, we were able to get the response email back in the same language. Thanks for the pointer.

What we observe is:
* In case of any Contact record present, the settings are picked up from the Contact record
* In case of no Contact record present, the settings are picked up from the Context User