Questions tagged [email-template]

Salesforce email templates come in a variety of shapes and sizes, ranging from Text to Visualforce. These email templates can be used through Salesforce through approval processes, workflows, etc to send email to users.

Filter by
Sorted by
Tagged with
0
votes
0answers
28 views

Send email template from apex not working

I'm trying to send an email, based on an email template, from an apex class. The following is my code: public static void sendMail(Account newAcc, Account oldAcc){ List<User> user1 = [...
0
votes
0answers
20 views

Splitting a single DE value into multiple variables using IndexOf() and Substring() to print in multiple email <td>'s [duplicate]

I'm struggling to figure out the best approach to split a single DE value separated by a pipe delimiter into multiple variables. The value looks like this: This is some text| This is some more text| ...
0
votes
0answers
15 views

Classic Email Template with VF Page

I have a VF page created with resources and css in it. I would like to create a classic Email template that poke that VF page and include it in the body of my email.I tried to copy the content of my ...
1
vote
1answer
36 views

Feeding Subject Line to Title for View as Webpage

I'm trying to use ampscript to feed the subject line to the title tag on the webpage that loads when clicking on VAWP. -I have the title tag set as <title>%%=v(@Subject_Line)=%%</title> in ...
-1
votes
1answer
17 views

pre-populated emails [closed]

Please see the initial sketch below. Can you please tell me if this is possible in Salesforce, or if there is a better way of doing this? Would I have to use Outlook? or can this be done directly ...
1
vote
0answers
25 views

System.ResetPasswordWithEmailTemplate not sending context to the VF Email Template

in here issue details: Context: In our system we are sending Welcome Emails using the method System.resetPasswordWithEmailTemplate to customers in our Experience Cloud (community). When we tried to ...
1
vote
1answer
23 views

Record page link is not appearing in the email

I am sending out an email from my code after a certain action, and I am trying to add the record link to it. But in the email that is being sent out, the link of the record page is not appearing or ...
0
votes
0answers
20 views

how to have buttons and social media images in salesforce email template

Hi, I have a requirement to create email template which includes company logo as header, email content , button, social media icons and other links and it has to be used in customer community. Looks ...
1
vote
1answer
40 views

Is it possible to remove extra html added when using content blocks in Marketing cloud?

I have an email that has to be sent, I am a developer, but not an MC consultant The problem is that when we create an email message & paste our email html code, everything works fine When we ...
0
votes
1answer
30 views

Single email messaging class functions [closed]

Is there any good resource where its explained clearly about the below functions of Single Email Messaging class and their usage: renderStoredEmailTemplate setWhatId setTargetObjectId setTemplateId ...
0
votes
1answer
24 views

Initial expression is of incorrect type, expected: Messaging.SingleEmailMessage but was: List<Messaging.SingleEmailMessage>

The below code gave me his error: Initial expression is of incorrect type, expected: Messaging.SingleEmailMessage but was: List<Messaging.SingleEmailMessage> How do I rectify this? Code: public ...
0
votes
0answers
25 views

HTML Visualforce Email Template for custom object lookup fields

I have a custom object called Class__c and Contact(Participant__c) is lookup field. I have set up an email alert every time a class button is clicked. But I'm unable to show the a lookup field value ...
0
votes
1answer
23 views

How to send financial force sales invoice with attachment [closed]

I've been trying to send the financial force email that from Apex that is called from a Process. As I understand the invoice should be attached when the email template is used with the WhatID set (...
1
vote
0answers
22 views

Attribute "src" on element <img> is not allowed, or has an invalid value

I have a packaged Lightning Email Template. I am able to upload an image file to a Lightning Email Template with ease. However, when I then try to move that email template to a new environment (i.e. ...
0
votes
1answer
39 views

2021 - Unable to use custom fonts for emails in Marketing Cloud

I've been trying to import a custom font for MC emails. I have followed the steps from this similar discussion: Custom font in Email content blocks I have tried both ways - using SFTP and ContentBlock,...
0
votes
1answer
27 views

(How) can I create an email template which digests multiple instances of an SObject?

Let's say I have a custom SObject MyObject__c with a custom text field Message__c. Periodically, I want to send out an email which will collect all instances of MyObject__c which have the same value ...
0
votes
1answer
69 views

Remove duplicates in Journey Builder

I was wondering if there is a way to remove duplicates in Journey Builder? I'm looking at creating a welcome campaign via Journey Builder. Currently I have within my welcome email AMPscript which ...
0
votes
1answer
34 views

AMPscript for adding the Order Number to an email subject

I am trying to add the order number to an email subject and I don't know-how. Plus I am really new to the AMPscript world. I want my email subject to be like: ''Your #OrderID is on the go'' for the ...
0
votes
1answer
18 views

VisualForce Email Template - Error: Syntax error If Condition

Getting Error: Syntax error when i tried to add the below condition in Visual-force Email Template with dynamic variable {!IF(recipient.RecordType.Name != 'Guardian',{!relatedTo.Name__c}, {!relatedTo....
0
votes
1answer
30 views

Details on JobContentBlock / Snapshotting

Recently i had to deal with a duplicate key error which was caused by a email activity inside a journey that somehow made me question a whole approach i have set up for templates and email across a ...
1
vote
0answers
30 views

Salesforce Email Reply BCCs

My client is looking to remove the auto BCC on Case Reply emails: I can do this by updating the EmailPreferencesAutoBcc field on the user record for the existing Users but how do I prevent this from ...
0
votes
1answer
26 views

Webservice callout in Apex component used in EmailTemplate thrws Programmer Error: transaction committed or rolled back while performing api operation

I have an email template which I need to build using many information , so I have used apex component <c:EmailTemplateComp ObjectID="{!relatedTo.Id}" show_url="false"></c:...
1
vote
1answer
46 views

How to create HTML email template for setup audit trail

I want to implement one functionality where batch class will send the audit trail data in the html body format to the specific recepient. I was trying to create the email template for setup audit ...
0
votes
0answers
38 views

Combine global variables and custom labels in email templates

I am trying to dynamically place {!$Network.NetworkUrlForUserEmails} in a custom label for an email template. I want to confirm if these two hypothetical solutions are possible: 1. Include global ...
0
votes
0answers
11 views

Not sure where the approval Email is getting triggered from!

I recently recieved a req to modify the template of Email being triggered by an approval process. Upon looking I donot find any such Email template in the org, and there is no Email Alert in the ...
0
votes
1answer
25 views

use instanceof keyword in a visualforce page

Im trying to use the instanceof keyword in a visualforce template. I would like to pull the MobilePhone field from the Related Owner record. This works when accessed in apex but is not working in the ...
0
votes
0answers
43 views

Getting the SSJS value from a for loop and assign it a ampscript variable

I have a requirement, I need to encrypt a data field value from the behavioral trigger Abandoned cart and after extracting the JSON body, I have to use the product information in the email template. ...
0
votes
2answers
53 views

Combining multiple rows of data into one email - Marketing Cloud

I'm having an issue trying to combine multiple rows into an email. As an example, I want to take the below data (Policy Data) and combine data where the policy number is the same and display that ...
0
votes
0answers
11 views

Previewing Survey Emails

I am sending survey email to Lead automatically via process builder. The template is lightning template connected to Survey Question object. Is there any way to preview this email on lead record ...
0
votes
0answers
40 views

mail.setTemplateId() not working?

In the snippet below templateID can be queried and set active. However the template does not show in the resulting email. If instead, I use mail.setHtmlBody() it works fine. Any ideas why ...
0
votes
0answers
34 views

{!Community} merge fields using HML in lightning email template

I'm working with custom lightning email templates for Community. Now I'm trying to merge Community fields in forgot password template. How can I add Community merge fields using HML syntax?
0
votes
1answer
39 views

Email is displaying user who deactivated account info rather than the user record that is being deactivated

I am sending email to single email address, when users are deactivated through apex. Below is my send email method public void sendMail(List<user> Users, string emailTemplateName, string address)...
1
vote
1answer
96 views

Apex Email CPU Limit

I am facing Too many SOQL Error. Reason: Using "renderStoredEmailTemplate" method inside for loop that counts against SOQL query for every iteration. global class FlowInput { @...
0
votes
0answers
36 views

Merge fields are not displaying on the email body once the template is selected

I have a Email custom page and everything seems working fine but when we select an template the merge fields we use in the template are not populating as expected but {!Contact.Name} is working fine ...
0
votes
1answer
29 views

Add classic / Lightning name to template folders during selection of email template

When a user searches for an email template while setting up the E-Mail send option, I want to add a clarification to the user showing if folders and templates are being pulled from classic or ...
0
votes
0answers
38 views

HTML email template not working while sending mail through apex

I am trying to send an html email template body in the mail from apex code by using messaging.renderStoredEmailTemplate method but it is sending plain text not html body. Here is the code : ...
0
votes
0answers
17 views

HTML Card are not working in visualforce Email template

i have two questions Q1). I create visualforce email template using the card for designing. code for card <div style="width :auto;overflow:auto; box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);...
0
votes
0answers
168 views

Guest User Cannot Send VF Email Template While Having Access to Object's Fields

I have a guest profile triggering a workflow rule/email alert when they click "Save Information" button on a public portal. If I log in as myself (internal user) the flow works and I get the ...
5
votes
1answer
377 views

1px white line between content blocks in Outlook

I have two content blocks in an email in Marketing Cloud. No matter what I do, there is a 1px white line between them on Outlook 2019 and Outlook Office 365 on Windows. The white line does not appear ...
0
votes
0answers
119 views

How to use a Record-Triggered Flow to Activate an Email Alert that holds a Visual Force Email

I have a record triggered flow that will activate an email alert containing a visual force email template that has fields being prepopulated ({!relatedTo.field__c}) and conditionally shown text (...
0
votes
0answers
24 views

"Send to a List" option is not available on Survey Builder

I m exploring Salesforce Out of box Survey capabilities, where one of the functionality is to send survey invitation to list of contacts/users/leads from Survey builder. As per Salesforce help ...
0
votes
1answer
481 views

HyperLink in record triggered flow

I have requirement to append contact link as url in email action in record trigger flow I have used Custom label stored as base url like: test.salesforce.com Created formula: {!$Label.Base_Url}&{...
0
votes
0answers
8 views

Add users Email Signature default while composing email

I need to add the logged-in user's signature while composing an email in salesforce. How can I do this? Also currently for each user, we have created separate signatures in the email template, which ...
0
votes
1answer
34 views

Approval Process : what if the Approver misspells the Approval/rejection word?

When submitting for approval, there’s an email going to the next approver. This email should have a key word on 1st line, it can also show the comment the submitter captured when submitting for ...
0
votes
1answer
20 views

Replace Subject fields on Lightning Email Template

I'm having problems with replace() operations of text that I have in Subject of my Email Template. Subject is like: A - B - C My code is: EmailTemplate eTemplate = newEmail.searchForEmailTemplate('...
0
votes
1answer
40 views

Classic Email Template (Visualforce) Overwrites Link, causing it to break

My visualforce email template keeps overwriting my link. The apex:outputLink portion is pulling through a formula field that generates a hyperlink This is what the formula is: SUBSTITUTE("https://...
0
votes
1answer
244 views

How to identify where an Email Template is being used if it's not under Email Alerts/Workflow Rules?

I'm trying to identify where a bunch of Email Templates are being used. I didn't find them under WF Rules/Email Alerts using the Template Name and I think some of them may be referenced through Apex ...
0
votes
0answers
42 views

Subject information duplicates whenever customer replies to email-to-case

I'm working with email-to-case and this request I've been struggling with is that our client did not want the thread id on the subject anymore, so I've only left it on the body instead, but now...and ...
0
votes
1answer
117 views

Lightning Email template Related Entity Types not populating

I'm trying to create an email template in lightning. The Related Entity Type dropdown is only loading Contact and lead, not all of the regular objects.
0
votes
0answers
24 views

How can I get template body [text] in apex class?

Here is my code below: List<Messaging.SingleEmailMessage> allmsg = new List<Messaging.SingleEmailMessage>(); Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); ...

1
2 3 4 5
23