-
How can i show Record Owner name in From/Reply in Email sent through Salesforce?
I want to show Record Owner name in From/Reply in Email sent through Salesforce. Can anyone help me in achieving this thing?
Here is my code----
list<String> listOfEmailsAddress = new list<String>();
for(Lead leadobj : leadList){
String [] toRecipients = new String[] {leadobj.NominatorEmail__c};
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
email.setToAddresses(toRecipients);
email.setSenderDisplayName(leadobj.Owner_Name__c);
email.setTargetObjectId(leadobj.Id);
email.setUseSignature(false);
email.setBccSender(false);
email.setSaveAsActivity(true);
email.setTemplateId(templateId);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});
}
Log In to reply.
Popular Salesforce Blogs
Stuck on the Salesforce Security Review Process?
The attack vector and evidence of vulnerability associated with each item is listed below with a description of the vulnerability. Remediation steps and additional educational…
How to Integrate QuickBooks and Salesforce?
Introduction QuickBooks, a leading accounting software platform developed and marketed by Intuit, a financial software development company helping businesses develop and sell financial, accounting, and…
Testing HTTP Callouts using SFCraft MockServer: Part 1 | Salesforce Help Guide
Recently I published my MockServer lib. The history behind it is simple — for years I’ve been writing HttpCalloutMock implementations for each new project. I don’t want…
Popular Salesforce Videos
Soar: A Salesforce Philanthropy Film
When one of us is lifted up, all of us are lifted up. 🐥 That's why we're supporting #GoGiveOne, a campaign to advance global vaccine…
Salesforce Tutorial For Beginners | Introduction To Salesforce | Salesforce Training
This video on Salesforce training will help you understand the easy and best tool for CRM and Branding. You will learn how to customize the…
Salesforce for Non Technicals | Salesforce for Non IT | Salesforce For Non Programmers
Wondering if Non-IT persons can learn Salesforce? Yes, watch this video and learn all you need to know. Do let us know in the comment…