Linked Questions
17 questions linked to/from Using APEX to assemble HTML Letterhead Emails
24
votes
6
answers
39k
views
Passing custom string into a Salesforce email template.
I've stumbled upon a problem at the final stage of a new feature I was building (as always)
I need to pass in a custom string into a salesforce template, however there doesnt seem to be a way of ...
2
votes
2
answers
11k
views
Sending VF email template using SingleEmailMessaging- Getting blank Email body
I have a VF email template as below which has relatedTOType as Job_Application__c and recipientType as User. I am using some merge field in this template:
<messaging:emailTemplate subject="TEST" ...
0
votes
2
answers
13k
views
How to get Email Template executed body
I am working on sending email by using 3rd party application like Amazon SES
When i query for perticular email template i am getting body whaever the email templated had
like
Email Template body
...
4
votes
1
answer
6k
views
Preview email content of email templates before sending
I am developing a feature to send a email from a Custom Visualforce page.
For this I am using the Messaging.SingleEmailMessage class.
I need to give users, the option to select email templates from ...
3
votes
2
answers
2k
views
Render a Salesforce Email Template in a Visualforce Page
I need to be able to load and render an email template in a visualforce page. What are my options here?
I understand that loading it is as simple as querying the EmailTemplate table. Now how do I ...
1
vote
2
answers
3k
views
How to write unit tests for emails being sent via Apex?
If I send an email via Apex
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setTargetObjectId(someContactId);
mail.setTemplateId(someTemplateId);
mail.setSaveAsActivity(...
2
votes
0
answers
4k
views
Dynamic Email Template Body
I have a requirement where I need to send the email template and also allow the use to change it and then send the content.
I am able to send email and attach a VF template dynamically. But I am not ...
3
votes
1
answer
2k
views
How to render a VisualForce email template to string
Is there a way, using Apex, to trigger the rendering of a VisualForce email template and capture the result as a string?
This would be used to set the HTML Body of an email to be sent using an ...
1
vote
3
answers
2k
views
Using Batch APEX to generate template body dynamically with merge field values
I am using Amazon SES to send mails to the all opportunities using batch apex with the body of email template. I'm using the solution proposed in an answer to Using APEX to assemble HTML Letterhead ...
4
votes
1
answer
2k
views
Rendering an Email Template with merged values
A while back I accidentally discovered this GREAT feature of Salesforce where I could display a merged email template via a URL.
It was a great feature to show sample emails in my help documentation....
2
votes
1
answer
3k
views
How to get Visualforce Email template content in apex?
I have a requirement where i have to use Visual force Email template.so, i have created a vf email template.Now i want to get that vf email body in apex controller.i now if i use custom HTML template ...
3
votes
1
answer
2k
views
Can I merge an email template in Apex, and also inspect it from code
Can I get the merged email template in Apex without sending it? I'd like to inspect the generated email first.
I think I found the answer on https://salesforce.stackexchange.com/a/8745/2330
1
vote
1
answer
2k
views
can setTemplateId be used along with SetHtmlBody for the following code?
public EmailMessageWrapper(String fromAddr, Id toAddrId, String sub, Map<String, String> mapSubjectParams, Map<String, String> mapBodyParams) {
this(fromAddr, null, toAddrId, null, ...
2
votes
3
answers
1k
views
How to avoid to send the mail to owner field
I have used the following code for sending the mail with template. but I don't want to send the mail to owner.
List<String> toAddress = new List<String>();
toAddress.add(my email ...
2
votes
2
answers
1k
views
Get VisualForce Email Template as Blob
Similar to how we can use apex to get the blob value of a VisualForce page, can we also do this on a VisualForce Email Template? We need to get the rendered template into an attachment record in ...