Skip to main content
added 12 characters in body; edited title
Source Link
Matt Lacey
  • 25.8k
  • 7
  • 68
  • 153

Vf Visualforce Email Template Not Showing Content

I want to send an email based on user specified language. For this we created an VFVisualforce Email Template with custom label:

<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!recipient.Email_Language__c}">
  <messaging:plainTextEmailBody >
    <apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/>
  </messaging:plainTextEmailBody>
</messaging:emailTemplate>

In the above code Email_Language__cEmail_Language__c will hold user language and LastLogin15LastLogin15 is ana custom label which has the email content that has to be translated.

Problem: when tested using Visualforce pages this is working fine, but when I test by sending a test email it doesn't display any content. Where am I going wrong?

Vf Email Template

I want to send an email based on user specified language. For this we created an VF Email Template with custom label:

<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!recipient.Email_Language__c}">
  <messaging:plainTextEmailBody >
    <apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/>
  </messaging:plainTextEmailBody>
</messaging:emailTemplate>

In the above code Email_Language__c will hold user language and LastLogin15 is an custom label which has the email content that has to be translated.

Problem: when tested using Visualforce pages this is working fine, but when I test by sending a test email it doesn't display any content. Where am I going wrong?

Visualforce Email Template Not Showing Content

I want to send an email based on user specified language. For this we created an Visualforce Email Template with custom label:

<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!recipient.Email_Language__c}">
  <messaging:plainTextEmailBody >
    <apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/>
  </messaging:plainTextEmailBody>
</messaging:emailTemplate>

In the above code Email_Language__c will hold user language and LastLogin15 is a custom label which has the email content that has to be translated.

Problem: when tested using Visualforce pages this is working fine, but when I test by sending a test email it doesn't display any content. Where am I going wrong?

added 13 characters in body
Source Link
Matt Lacey
  • 25.8k
  • 7
  • 68
  • 153

Hi, II want to send an email based on user specified language.For For this we created an VF Email Template with custom label .Here is my work

<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!recipient.Email_Language__c}"> <messaging:plainTextEmailBody > <apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/> </messaging:plainTextEmailBody> </messaging:emailTemplate>

<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!recipient.Email_Language__c}">
  <messaging:plainTextEmailBody >
    <apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/>
  </messaging:plainTextEmailBody>
</messaging:emailTemplate>

In the above code Email_Language__c will hold user language and LastLogin15 is an custom label which has the email content that has to be translated.

Problem: when tested using vfVisualforce pages this is working fine.But, but when iI test by sending ana test email it doesn't display any content....suggest i'm i gone Where am I going wrong.?

Hi, I want to send an email based on user specified language.For this we created an VF Email Template with custom label .Here is my work

<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!recipient.Email_Language__c}"> <messaging:plainTextEmailBody > <apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/> </messaging:plainTextEmailBody> </messaging:emailTemplate>

In the above code Email_Language__c will hold user language and LastLogin15 is an custom label which has the email content that has to be translated.

Problem: when tested using vf pages this is working fine.But when i test by sending an test email it doesn't display any content....suggest i'm i gone wrong.

I want to send an email based on user specified language. For this we created an VF Email Template with custom label:

<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!recipient.Email_Language__c}">
  <messaging:plainTextEmailBody >
    <apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/>
  </messaging:plainTextEmailBody>
</messaging:emailTemplate>

In the above code Email_Language__c will hold user language and LastLogin15 is an custom label which has the email content that has to be translated.

Problem: when tested using Visualforce pages this is working fine, but when I test by sending a test email it doesn't display any content. Where am I going wrong?

I'm tryingHi, I want to createsend an Vf email template. Here is the peace of code which i tried. to support multibased on user specified language.For this we used acreated an VF Email Template with custom field called Email_Language__clabel .Here is my work

error what i receive is<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!recipient.Email_Language__c}"> <messaging:Invalid field c2g__c for SObject User_Status__c
plainTextEmailBody > what does c2g__C refers to?<apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/> </messaging:plainTextEmailBody> </messaging:emailTemplate>

<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!relatedTo.c2g__c.User__r.Email_Language__c}">
<messaging:plainTextEmailBody >
Hello {!User_Status__c.User__c},
<apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

In the above code Email_Language__c will hold user language and LastLogin15 is an custom label which has the email content that has to be translated.

Thanks in advanceProblem: when tested using vf pages this is working fine.But when i test by sending an test email it doesn't display any content....suggest i'm i gone wrong.

I'm trying to create an Vf email template. Here is the peace of code which i tried. to support multi language we used a custom field called Email_Language__c .

error what i receive is :Invalid field c2g__c for SObject User_Status__c
what does c2g__C refers to?

<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!relatedTo.c2g__c.User__r.Email_Language__c}">
<messaging:plainTextEmailBody >
Hello {!User_Status__c.User__c},
<apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

Thanks in advance

Hi, I want to send an email based on user specified language.For this we created an VF Email Template with custom label .Here is my work

<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!recipient.Email_Language__c}"> <messaging:plainTextEmailBody > <apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/> </messaging:plainTextEmailBody> </messaging:emailTemplate>

In the above code Email_Language__c will hold user language and LastLogin15 is an custom label which has the email content that has to be translated.

Problem: when tested using vf pages this is working fine.But when i test by sending an test email it doesn't display any content....suggest i'm i gone wrong.

added 24 characters in body
Source Link
Phil Hawthorn
  • 16.8k
  • 4
  • 49
  • 76
Loading
Source Link
user7447
  • 99
  • 1
  • 13
Loading