Questions tagged [email]

Salesforce provides multiple forms of email, including email templates, mass email, email services, email alerts, and email sent via Apex.

Filter by
Sorted by
Tagged with
46
votes
1answer
34k views

Setting a from address in SingleEmailMessage

I want to set a from address in a salesforce SingleEmailMessage, but can't see a way to do this and there is no standard method described in the documentation. I want the email to be sent from ...
7
votes
1answer
2k views

Get Preview of Email with AMPscript Using Rest API

Im trying to get the SendPreview rendering of an E-Mail with Contact Data from an Dataextension. The E-Mail includes AMPScript. I tryed the following route: https://www.exacttargetapis.com/guide/v1/...
8
votes
1answer
141 views

Emails Per Invocation Still Capped at 100?

I was recently trying to answer a question about email limits. I remember there being a cap on the number of emails sent per invocation (100), but I couldn't find any documentation that still mentions ...
13
votes
4answers
9k views

How to test if outbound email is send

I have a batch that sends out an email notification to the triggering user when something went wrong. The code that does this is called from the finish() method. I'm now looking for an elegant way to ...
17
votes
2answers
6k views

What's the Advantage of using MassEmailMessage instead of multiple SingleEmailMessage?

I'm scoping out a project that will involve sending outbound email messages, and I'm a little confused about why one would use a MassEmailMessage instead of multiple SingleEmailMessages. If you look ...
15
votes
4answers
19k views

SINGLE_EMAIL_LIMIT_EXCEEDED. What does it mean?

What does the exception mean? It does not seem to be related to the Number of email invocations limit because of the following line at the end of the log: Number of Email Invocations: 5 out of 10 I ...
6
votes
2answers
5k views

Anyway to control Communities E-mail Welcome Message

We have an org that we are moving from Portals to Communities, the Communities Welcome E-Mail is sent to all user accounts when their user/account is created: From the Communities > Administration > ...
6
votes
3answers
688 views

For the Platform Event “Automated Process” user, why do both Visualforce controller access and email sending fail?

We are executing some asynchronous code that uses getContentAsPdf on a Visualforce page as the result of handling custom platform event and we get this error in the Apex Jobs listing: First error: [...
2
votes
2answers
2k views

Possible to selectively turn off Marketing Cloud email click tracking?

I know I can turn click tracking on or off per-email by unchecking the "Track all links in this email" at send, but I was wondering if there was a way (possibly with AMPscript?) to turn off click ...
1
vote
1answer
2k views

Case Emails - Custom Button - TO field not populating properly

https://na4.salesforce.com/_ui/core/email/author/EmailAuthor? p3_lkid={!Case.Id}&retURL=%2F5{!Case.Id}& p26=cs@markettraders.com:Customer%20Service I have gone back and forth with this code, ...
1
vote
2answers
4k views

Is is possible to display an image or icon in a Email using a Visualforce template?

I am trying to send an email using a Visualforce template and I want that template to include an icon. Is this possible?
1
vote
2answers
963 views

Journey Builder - BCC Email Address

I configured a journey in Marketing Cloud where i sent an email. My requirement is adding BCC email addresses to this email, but I noticed that we can only add valid email addresses. Could you confirm ...
1
vote
1answer
1k views

SaveAsActivity is not allowed with whatId that is not supported as a task whatId

While trying to create a custom business rule using Apex I got the error: INVALID_ID_FIELD, SaveAsActivity is not allowed with whatId that is not supported as a task whatId. ...and found out that it ...
38
votes
3answers
3k views

How can I capture a system.limitexception stopping my emails being sent

In Salseforce governor limits, it states that every org is allowed to send single emails to 1000 external addresses every 24 hours. On very rare occasions, an org I work with has exceeded this limit ...
11
votes
5answers
11k views

How to override the “Send an Email” button on the Case object - Emails related list

On the Case object page, there is an Emails related list which has a Send an Email button taking the user to another page to fill in the email. I haven't been able to find a way to override the ...
4
votes
1answer
526 views

Using Exclusion Script with _Sent Data View

I would like to use an Exclusion Script when sending an email from Content Builder where if the Subscriber has received an email in the past week, then the email should be suppressed from sending. ...
1
vote
4answers
5k views

Individual Email Results not appearing for Salesforce Send Emails

We are sending Salesforce Send Emails from Marketing Cloud using a Salesforce Data Extension. We can view the Email Send from the 'Email Sends' tab within Sales Cloud, however the 'Individual Email ...
7
votes
3answers
8k views

Is it possible to send an email via the REST API?

I'm looking to send emails through the REST API, specifically through Restforce in Ruby, but I can't find any resources on this. I am finding my resources about the sendEmail function, and how to set ...
1
vote
2answers
1k views

Retrieving html body of complete SFMC email

I am sending emails via SFMC/ExactTarget to clients using SOAP. I store the returned request ID in a database. Sometimes I specifically need to retrieve the completed HTML body from that request for ...
8
votes
3answers
4k views

Can't set toAddresses on email when templateId defined?

Question Did something change recently with the SingleEmail methods that prevents using setToAddresses() when a template is used? Background I need to send an email to a user based and pass in the ...
7
votes
1answer
497 views

Dynamic html mail process through single list

I want to sent a mail through single list every week.html mail and text mail both. It is possible to create one list like "12548" and add the different user like "abc@gmail.com","xys@yahoo.com", .... ...
5
votes
2answers
4k views

How do you use Batch for send more than 10 emails?

I have been watching how to implement the batch for sending more than 10 email but I get errors. When I send emails I have a limit 5 and also are sent several times to the same user email global ...
2
votes
1answer
8k views

How to send email on custom button using Javascript

I have created custom button to send visualforce page url with opportunity id in opportunity detail page. How can i send URl like 'https://c.ap1.visual.force.com/apex/QuoteOrderForm?id=0069000000DOa0Q'...
11
votes
1answer
1k views

Identify which OrgWideEmailAddress records are valid for current user

I'd like to create a popup list on one of my Visualforce pages, for a user to select from a list of OrgWideEmailAddress records. My goal is to limit the list to only those records that they're ...
9
votes
2answers
15k views

How to Test Messaging.sendEmail

Looking for some help/advice in writing a test class. The class I need to test is an apex class to schedule a report that needs to be sent to an external email address once a month as a .csv ...
4
votes
1answer
263 views

Platform Event subscriber not sending email to gmail domain

I am trying to send an email to the user who initiated the event in the case of an error during event processing. In the subscriber I have code similar to the following: public void onAfterInsert(Map&...
1
vote
2answers
212 views

Can I change email content without stopping a journey?

I've created a journey in salesforce marketing cloud to send a set of emails. This journey is currently active & running. I want to do some changes in existing content of one of the email (for ...
1
vote
2answers
3k views

ErrorCode 180008 - Unable to queue Triggered Send request. There are no valid subscribers

I'm trying to send an email by ET rest api in Java. I already successfully sent a SMS and got a token in response, but an error is triggered with emails. Here is the JSON I send : { "To": {"...
6
votes
2answers
2k views

WHY Can't I Use SetTargetObjectId(UserId) and SetWhatId?

I have a very simple error handling case. I need to send an email to the running user, who almost certainly does not have an associated Contact record. I also need to specify the error record in ...
5
votes
2answers
8k views

Email Button - Email Template

I would like to create a custom button in the Contact detail page that when we click on it, it sends an email template capturing the information of that paricular contact. How can I do this? Any ...
4
votes
1answer
613 views

HTML editor error in content builder

We're transitioning all our old email code from the Classic Content into the Content Builder, but I've run into an issue several times that looks like a glitch in the HTML editor (NOT the wysiwyg) to ...
4
votes
1answer
1k views

Adding an attachment to the EmailAuthor page

I would like to have a button on an opportunity page that generates and saves a pdf as an attachment object and then opens the /_ui/core/email/author/EmailAuthor page with the attachment already ...
4
votes
1answer
913 views

Is there an easy way to change the WYSIWYG editor for sending emails?

I've noticed that the WYSIWYG editor for sending HTML emails in a SalesForce case is dated (doesn't support keyboard shortcuts, doesn't support text indentations, doesn't support font styles/headers ...
3
votes
1answer
756 views

Password protected Visualforce Page rendered as PDF

Is it possible that a Visualforce page rendered as pdf can be password protected? I am using Messaging.SingleEmailMessage to send mail with attachment, but I need the attachment password protected.
3
votes
2answers
3k views

How do I test an apex trigger that sends an email

Trigger is: trigger emailtemplate on opportunity(after update) { List<opportunity> oList = Trigger.new; List<opportunity> nList = trigger.old; if(oList[0]....
3
votes
2answers
197 views

How to know current Email governor limits? [duplicate]

I am using SingleEmailMessage api for sending emails. I want to know the email limit quota usage, so that I can prevent further exceptions. Is there any way to know the quota usage in apex, so that I ...
2
votes
1answer
1k views

Why cant I receive the email

I have a class which I fire with a button from opportunity detail page with a lookup field Contact to Contact obj. When i debug mail I see all info listed but it cant receive the email: public class ...
2
votes
1answer
1k views

Apex Email Trigger for a specific calendar

I'm battling my way through learning Apex, and have created an email trigger for new Events posted in our organization's calendar. I think I have it right (it's still in our sandbox so I can't see ...
1
vote
2answers
93 views

Null in aggregate query

I have an image stored as a document. I put this image in an email template and reference it by doing: <img id="toplogo" src="{!LEFT($Api.Partner_Server_URL_140, FIND('.com/',$Api....
1
vote
1answer
1k views

XML and AMPscript — how do I “BuildRowSetFromString” using data from my API post?

I'm trying to build a confirmation email whereupon we create a rowset from a string within the API post. We currently do this without issue when evaluating data from a Data Extension, but I can't ...
1
vote
2answers
4k views

Email to salesforce error

While sending an attachment as an email to be attached to the salesforce record.Salesforce is giving the below given error. Generating server: mx1.madison.gov 6-...
1
vote
2answers
192 views

Marketing Cloud custom url expiration

Is it possible in Marketing Cloud to set custom expiration which applies only to one particular URL? We include lots of different links in our emails, these have to stay valid as long as possible as ...
0
votes
2answers
188 views

SingleEmailMessage not working when used through apex test method

Was trying to use SingleEmailMessage to send email when a apex test method is invoked, but seems like it does not work. When same code is executed via anonymous apex block it works fine. Any ...
0
votes
2answers
2k views

How to send Weekly Email to email-fields of records?

I have rejected Workflow Rules, since email alerts can't be sent at the exact same time every week. I have rejected schedulable Reports/Dashboards since emails can't be sent to email fields of records ...
0
votes
2answers
4k views

Emails from salesforce ending up as Spam

We are noticing for some days now that the emails sent by Salesforce are ending up in Spam folder of our customers. I have read lot of blog posts / forums regarding this but could not reach a ...
0
votes
1answer
401 views

Trigger Emails - Not able to modify the FromAddress using TriggeredSendDefinition

I am trying to trigger send an email using TriggeredSendDefinition. Every time I am receiving an email from the DEFAULT account (Business unit email id). I tried to give from address in ...
0
votes
1answer
2k views

Send an email with files attached with a trigger

we have deployed a trigger on Tasks that sends an email when the users change the value of the status task field. Now we are using this email as a notification but we need to attach into the email ...
0
votes
1answer
3k views

Trying to put server name into a URL for email template

I am using a visual force template. I can put the origin server in the email by doing: {!LEFT($Api.Partner_Server_URL_140, FIND(".com/",$Api.Partner_Server_URL_140)+3)} and when I an email sent I'...
0
votes
2answers
230 views

How to find 'URL' and append something at the end of URL

In Data Extension one field 'HTML' have Data that I have shown below, Now I have to Find the 'Href', and and at the last of URL append some text like '&MC='. It may have Multiple 'Href'. Please ...
11
votes
4answers
3k views

How can you avoid hitting 24-hour limits on emails and future calls?

I realize there are plenty of ways to try to avoid hitting limits in the first place, but when it comes to features with 24 hour limit plans, how can you know if you're getting close to them? And ...