Skip to main content
Hi

I've created a Visualforce email template in a sandbox, but when testing via the "Send Test and Verify Merge Fields" I don't receive the email despite checking the "Send email preview to:" and entering my email address. 

The merge fields work correctly in the preview pane.

 

<messaging:emailTemplate recipientType="User"

relatedToType="Insight_Brief__c"

subject="Test Template"

replyTo="karen.davison@precise.co.uk" >

<messaging:htmlEmailBody >

<html>

<body>

<STYLE type="text/css">

TH {font-size: 12px; font-face: arial; background: ⌗000000; border-width: 1; text-align: center; color: ⌗ffffff }

TD {font-size: 12px; font-face: arial }

TABLE {border: solid ⌗000000; border-width: 1; width: 600; border-collapse: collapse;}

TR {border: solid ⌗000000; border-width: 1}

ul {list-style-type: square; color:⌗FFD700;}

ul li span { color: black; }

</STYLE>

<font face="arial" size="2">

<p>Dear {!recipient.name},</p>

<p>Below is a list of criteria related to the Insight Brief:<b> {!relatedTo.name}</b>.</p>

<p/>

<table border="0" >

<tr >

<th>Criteria</th><th>Options</th><th>Note</th>

</tr>

<apex:repeat var="cx" value="{!relatedTo.Criteria__r}">

<tr>

<td><apex:outputText value="{!cx.Name}" escape="false"/></td>

<td><apex:outputText value="{!cx.Options__c}" escape="false"/></td>

<td><apex:outputText value="{!cx.Note__c}" escape="false"/></td>

</tr>

</apex:repeat>

</table>

<p />

</font>

</body>

</html>

</messaging:htmlEmailBody>

<messaging:plainTextEmailBody >

Dear Karen,

Below is a list of criteria related to the Insight Brief: {!relatedTo.name}

Job: {!relatedTo.Job__c}

[ Criteria ] - [ Options ] - [ Note ]

-------------------------------------------------------------------------

<apex:repeat var="cx" value="{!relatedTo.Criteria__r}">

[ {!cx.Name} ] - [ {!cx.Options__c} ] - [ {!cx.Note__c} ]

</apex:repeat>

</messaging:plainTextEmailBody>

</messaging:emailTemplate>

Am I missing something obvious?

Thanks
2 answers
  1. Nov 24, 2015, 1:03 PM
    Sandbox?  Have you turned on email deliverability?  When Sandbox's are created/refreshed - the email delierability is automatically turned off.  Setup-Email Administration-Deliverability 

     
0/9000