You need to sign in to do that
Don't have an account?

Why display Name not showing up in email?
I am try below code and its not showing email display name, even its not showing full email address. Its just picking before the @ symbol like if my org wide address is asw_india_supp@gmail.com then in from it will come asw_india_supp
Here is my code peice
Here is my code peice
Messaging.SingleEmailMessage singEmail = new Messaging.SingleEmailMessage (); String [] toAddresses = new list<string> {'ashwani.pradhan@test.com'}; //Set recipient list DateTime d = DateTime.now() ; String dateStr = d.format('MMM-dd-yyyy'); // Use Organization Wide Address for(OrgWideEmailAddress owa : [select Id, Address, DisplayName from OrgWideEmailAddress]) { if(owa.Address.contains('ir')) singEmail.setOrgWideEmailAddressId(owa.id); } singEmail.setToAddresses (toAddresses); singEmail.setSubject('Salesforce Contact Correspondence Details Report as of '+ dateStr); singEmail.setHtmlBody('Hello'); Messaging.SendEmailResult [] r = Messaging.sendEmail (new Messaging.SingleEmailMessage [] {singEmail});Please help..
The Display name is just the name which will be shown in the recipients email.You can go through this link https://help.salesforce.com/apex/HTViewHelpDoc?id=orgwide_email.htm
Display Name is the word or phrase users who receive your email will see as the sender of the email.
Thanks
Anupama
Hi Vineet, We can not set display name if using setOrgWideEmailAddressId.
Thanks,
Ashwani
I just tested your code and I was able to see the name<emailaddress>
There maybe a chance of the group email causing the issue, but I personally think that shouldn't be the issue.
Even I tested your code for me name displays, but when I hover it shows complete email id.
Thanks and Regards
sandhya
Thanks guys for helping.