9
votes
Accepted
Do we have any option in salesforce to make the mail as important in apex code?
Using Messaging.SingleEmailMessage, you can use emailPriority method to set it.
Messaging.SingleEmailMessage mail =
new Messaging.SingleEmailMessage();
// Set other values of mail
Mail....
7
votes
Can we Enable Send Log Per Business Unit in Marketing Cloud?
There are 2 types of Send Logs Available in Marketing Cloud.
Account Level Send Log (AKA Enterprise Send Log) - This is enabled for an account and all sends (even from child Business units) will be ...
7
votes
Test class Limits.getEmailInvocations() showing zero and assertion is failing
The reason is because the test.starttest and test.stoptest create a new apex context. Inside the context it will show 1.
so try:
Test.startTest();
update recordsToUpdate;
System.assertEquals(1, ...
6
votes
Accepted
How to test SendEmailResult for SingleEmailMessage
This is fun question! I've tried to noodle this a few different ways and show examples of developer-friendly test cases. But I confess: there is the possibility it will be a frustrating job in real ...
6
votes
Accepted
Send an Email in Hindi or Other Language
I think you're email encoding settings are set to ISO-8859-1. This only supports latin languages (like English). If you change this to UTF-8 than you should have full support for Hindi and any other ...
5
votes
Accepted
Add date of send to Sendlog for every record?
Yes, you can just add an EventDate column to your Send Log and have it default to Current Date. That's the easiest.
You can also create an AMPScript variable in your email named EventDate and set ...
5
votes
Accepted
Sending email based on Timezone of IP address
You can't send based on the recipient because you won't know what timezone the recipient will be in until they open the email.
If the subscriber has their timezone stored as a profile attribute/data ...
5
votes
Accepted
Email send throttling finishing 1hr earlier
Send throttle doesn't spread the batch sends throughout the hour, it basically sends the 1st batch as soon as possible and waits for another hour to send 2nd batch and follows the rest.
In your ...
5
votes
Accepted
MassEmailMessage vs “Too many Email Invocations: 11”
Your entire test method is treated as a single transaction. Since you have the insert inside the for loop, you are executing sendMail 11 times in this single transaction, and thus you get the error.
...
5
votes
Accepted
Image disappear when the email is sent
Why not just use inline AMPscript to output the @ImageURL value? Removing the double-quotes to make the concat function work is likely the issue:
<!--[if mso | IE]>
<td style="vertical-...
4
votes
How to find out what Sender Profile/Send Classification was used for a send
Through a Query Activity you will be able to extract the Send Classification and the Send Definition for any specific job, by looking into the Data View: Job
http://help.marketingcloud.com/en/...
4
votes
Accepted
Fail to send email by utility class
Remove this line
email.setSubject(template.name);
as error clearly says When a template is specified, the plain text body, html body, subject, charset, and "treatBodiesAsTemplate" may not be ...
4
votes
How hard bounce emails are treated by Marketing Cloud?
Once set to Bounced, Marketing Cloud stops trying to deliver only that email message which bounced. It'll try again with the next email (depending on subscriber status)
A Hard Bounce happens as soon ...
4
votes
Emails from flow not sent to gmail email addresses
I figured out that, If the sender was using one of our company domain email addresses, emails were not received in gmail and were spam in outlook. However they are received properly if the sender is ...
3
votes
Accepted
ExactTarget Triggered Send is not processing any messages
You'll have to contact SFMC Support to get the exact error that's causing your issues.
In the meantime, if you've configured your Triggered Send Definition to write to a Triggered Send templated ...
3
votes
Messaging.sendEmail(<list of emails>) - Is it all or nothing if errors encountered (e.g. bounces)?
Looks like the official documentation for this method has been updated since the last accepted answer:
public Messaging.SendEmailResult[] sendEmail(Messaging.Email[] emails, Boolean opt_allOrNone)
...
3
votes
Email Address Fields in Sendable DE
Your SubscriberKey should be of Text datatype and you should only have one field of EmailAddress datatype. When sending to a Sendable DE like that, the email will be sent to the address in the ...
3
votes
Accepted
What custom fields can I include in the SFMC send log?
You can add additional fields using the name Marketing Cloud uses for these values, so they are populated automatically. For the send date you can add a Date column and set a default value of GETDATE()...
3
votes
Accepted
Salesforce Contact's Email Sends empty
The Email Sends list will only populate with email sends made to individual contacts / leads. If it's added onto the page layout, you will see that Send Marketing Cloud Email link in addition to the ...
3
votes
Accepted
Clarification on SFMC Send Classifications and how many are needed
A send classification (SC) is basically 3 things:
Type of messaging [MT] (Transactional vs. Commercial)
Sender Profile [SP] (From Name/Address and Replyto instructions)
Delivery Profile [DP] (IP ...
3
votes
Accepted
What kinds of locks are used on Data Extensions and Sending?
Marketing Cloud does not enforce referential integrity, so you can perform simultaneous operations on the same Data Extension, and suffer consequences.
You're right, this can result in contention ...
3
votes
How to see tracking of emails sent through marketing cloud in sales cloud at lead & contact level?
If you have already done the integration, you are just probably missing this step: https://help.salesforce.com/articleView?id=mc_co_update_page_layouts.htm&type=5
You can find all the info about ...
3
votes
Accepted
Salesforce DEs are not visible in Automation Studio when configuring an Email Send
They should still be available as their own activity called Salesforce Email Send. You might need to get that enabled in your account because I see it in some accounts but not others.
3
votes
Accepted
Messaging.sendEmail not sending emails for non-admin profile in sandbox
There's a note at the bottom of this help document that clarifies there was a recent change (Summer '19) that is causing your issue
Please note as of Summer Release 19', Users must have a verified ...
3
votes
How to incorporate styling into Messaging.sendEmail()
It's definitely your mail client(s). I tested your code in my org, and then used Gmail's "view original" feature to take a look at the raw message, and I got this:
------=...
3
votes
Accepted
Can you populate SendLog DE with a different value than the one in target DE matching field?
First of all, there are four ways of populating a custom field in the Email SendLog:
1.1 Matching field name in the Sendable DE
1.2 Matching attribute name passed in the API's Payload (e.g. ...
2
votes
Sending Email using Email Author in custom button
Also you can add "&new_template=1" if you want attachments from email templates to show up.
2
votes
Method doesn't exist setToaddress issue
See: SingleEmailMessage Methods. Instead of passing String, you need to pass List<String>.
email.setToAddresses(new List<String> {sendToEmail});
setToAddresses(toAddresses)
...
2
votes
HTML Email Template Merge field values not coming in email
Here is a code that have fix to your questions and some of the bulkifications issues:
Query fields before use
Query template only once
Query ABV_Form_Request_abv__c only once
Updated version of ...
2
votes
Email class fails to trigger email
The problem is on line 16:
return pageRef;
When you return from a function, nothing written after that will execute.
Try moving this line to the end of your code (and get rid of the return null; ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
send-email × 200marketing-cloud × 85
email × 47
apex × 37
dataextensions × 24
ampscript × 16
email-template × 16
singleemailmessage × 15
journeybuilder × 9
visual-workflow × 7
apex-email-service × 7
trigger × 6
soap-api × 6
visualforce × 5
javascript × 5
unit-test × 5
rest-api × 5
lightning-experience × 5
tasks × 5
activities × 5
email-studio × 5
lightning-web-components × 4
community × 4
custom-button × 4
marketing-cloud-connect × 4