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
TheProjectSolutionTheProjectSolution 

VisualForce Email Templates not Rendering HTML Correctly w/ Lead Auto-Response Rules

Hi all,

 

We've implemented a VisualForce email template to provide Lead submitters from our Web site with a shipping label PDF attachment in our auto-response email, in order allow customers to mail their computer donations to us free of charge.

 

The VisualForce template associated with the auto-response rule calls an app called Tubarcode that renders the SFDC Lead ID into a visual bar code that can be scanned for identification of the shipping package from the customer.

 

The challenge is that while the VisualForce Email template works fine when instantiating it manually via the SFDC Lead Page > Send An Email transaction, when the same template is linked with the auto-response rule, it doesn't render the bar code correctly, instead displaying a giberrish placeholder image in the PDF.  The bar code graphic is rendered in HTML from the LeadID by the Tubarcode app, which is licensed to the same user as the default Workflow user and the default Lead Creator:

 

 

Could the problem be due to some sort of odd way the Lead auto-response rules are authenticating to SFDC?

 

Any ideas?

Cheers,

JASON ALBINO / Principal / Consultant

 

 PH 415/867-3745 • FX 435/579-8640

 TheProjectSolution.com

ahab1372ahab1372

not sure, but I think images in sfdc emails are typically not embedded but supposed to be on the server. They are then loaded when the recipient views the email. By that time, all the action in your org is already history ...

 

Maybe you can try to render the bar code as a pdf (look for apex:page renderAs="pdf") and attach the pdf to the email.

 

This might help: http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_email_sending_attachments.htm