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
Kaeli SanerKaeli Saner 

why is my recipient name not displaying in visualforce template

I'm writing my first visualforce email template and have successfully displayed everything as needed, except the recipient name. I am sending this via a workflow using an email alert with my visualforce template. The list of recipients (contact records) are pulled as individual lookup field values on the record I am using to populate my email with.
When my workflow fires, the template gets sent to the correct Contact email addresses, I am just not able to get the Contact Name to display in the email. My email just comes out as "Dear  ,"
I'm not sure what I am missing here or where I might have messed up, any help/suggestions would be greatly appreciated!

Here is my template:
<messaging:emailTemplate recipientType="Contact"
relatedToType="Project__c"
subject="Status Report {!relatedTo.name}"

replyTo="explore@primerosystems.com">
<messaging:htmlEmailBody >
<html>

<body>

<p>Dear {!recipient.name},</p>
<p>{!relatedTo.Personal_Note_to_Customer__c}</p>
<p>Below is our status report for {!relatedTo.name} for the week ending .</p>

<table border="0" >
<tr>
<th>Initiative</th>
<th>Blocking Items</th>
<th>Comments</th>
<th>On track with hours?</th>
<th>Comments</th>
<th>Other concerns?</th>
<th>Comments</th>
<th>Sprint/Schedule Status</th>
<th>Comments</th>
</tr>
<apex:repeat var="cx" value="{!relatedTo.Initiatives__r}">
<tr>
<td>{!cx.Customer_Name__c}</td>
<td>{!cx.CSBlocking_Items__c}</td>
<td>{!cx.CSComments_Blocking_Items__c}</td>
<td>{!cx.CSOn_track_with_hours__c}</td>
<td>{!cx.CSComments_On_Track__c}</td>
<td>{!cx.CSOther_Concerns__c}</td>
<td>{!cx.CSComments_Other_Concerns__c}</td>
<td>{!cx.CSSprint_Schedule__c}</td>
<td>{!cx.CSComments_Sprint_Schedule__c}</td>
</tr>

</apex:repeat>
</table>

<p/>
<center>

If you have any suggestions as to content that would be more beneficial to you or adjustment of the frequency of our status emails to you, please let us know so that we may adjust to suit your needs better.

</center>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 
Best Answer chosen by Kaeli Saner
NagendraNagendra (Salesforce Developers) 
Hi Saner,

Sorry for this issue you are encountering.

May I suggest you please check with below link from the community forums with a similar discussion which might help you further with the above requirement. Please let us know if this helps.

Kindly mark this as solved if the information was helpful.

Thanks,
Nagendra