You Can’t Customize Your Salesforce Email Verifications

Posted by:

|

On:

|

Hello savvy treasure hunters! I was trying to find the secret path to customizing email verification in Salesforce but to no avail.

Recent changes from Salesforce now require that emails listed for all users be verified email addresses. And this is now enforced for all Salesforce orgs and Experience Cloud sites as of the Summer ’24 release. My hope was that I could change the standard Salesforce branded emails to a custom branded message to users.

Customizing Email Verification by Creating a New Template

I attempted first through creating a new email template. And then I tried sending the Apex method, sendAsyncEmailConfirmation, to send out the email verifications with the new email template for the template id.

System.UserManagement.sendAsyncEmailConfirmation([userid],[templateid], [] , [return url once user has verified]);

This method did not work though because the the standard Salesforce email verification was still sent instead of the custom template specified.

I did however determine that you can send out the email verification in bulk with this apex method so below is the code you can use with 50 or less users at a time to send out the verification email.

List<String> userIDList = new List<String>{'userid1','userid2', [add more user ids as necessary - up to 50] };
List<User> userIds = [SELECT Name, Email FROM User WHERE Id in :userIDList];
    for (User u : userIds) {
        System.UserManagement.sendAsyncEmailConfirmation(u.id, null, null, null);
        System.debug('Sending emails to '+u.name+' '+u.email);
    }
  }

Changing the User Verification Template

The next method I tried was through modifying the existing verification email template. According to the article here, you can modify the Communities: User Verification Email which would send the modified email template.

This was not successful in sending to standard Salesforce users. The original email from Salesforce was still sent out when clicking the verify button on the user. This email template may work for Salesforce Experience Cloud Users but I haven’t had a chance to test it with those user types.

It would be ideal if we could send a custom branded email in many situations instead of the standard Salesforce user emails but unfortunately I was unsuccessful.

I did find a Salesforce idea link to allow for customizing all standardized emails sent out from Salesforce here : https://ideas.salesforce.com/s/idea/a0B8W00000GdbpTUAR/allow-customization-of-notification-email-subjectcontent

Need help finding the Salesforce gems?

Let us help! Were seasoned Salesforce treasure hunters.