Use Org Wide Email Address For Email Notifications

How to set a custom email address for your notifications

Last published at: 2024-08-01 08:15:41 UTC

By default SRR will use the running user to send the email notifications. Often this is an 'automation user' account but sometimes you may have regular user accounts triggering SRR, and the email notifications may look odd coming from those users. In these circumstances you may wish to set an Org Wide Email Address as the sending address for your notifications.

Create the Org Wide Email Address

If you don't already have the Org Wide Email Address you wish to use, create it first.

  1. Go to Setup > Organization-Wide Addresses
  2. Click the Add button
  3. Give it a Display Name and enter the Email Address of a functioning email account (you will need to verify this later)
  4. You can leave the Purpose as User Selection but for greater utility feel free to choose User Selection & Default No Reply Address
  5. Choose to allow All Profiles or, if necessary, select the profiles as per your security guidelines
  6. Save
  7. Go to the email inbox for this email address and you should have received an email with a verification link - click that link to verify the address

Get the Id of the Org Wide Email Address

We now need to get the Id of the email address you wish to use. The following steps simply get the Id from your database, nothing more. You'll need system administrator access to query the Id as follows:

  1. Open up the Developer Console (it is a menu item when you click on the cog icon that you click on to navigate to Setup)
  2. In the Developer Console, click on the Query Editor tab
  3. Enter the following query: select Id, Address from OrgWideEmailAddress
  4. Click Execute
  5. In the results panel you should see one or more rows corresponding to the Org Wide Email Addresses currently configured on your system
  6. Find the row containing the new email address you want to use for the notificaitions
  7. Click in the Id and copy this Id

Enter the Id into a Custom Metadata Type

Now we have the Id of your Org Wide Email Address, we need to tell SuperRoundRobin about it.

  1. Go to Setup > Custom Metadata Types
  2. Click 'Manage Records' next to SRR Optional Parameter 
  3. If OrgWideEmailAddressId exists, click 'Edit' next to this and paste the Id into the 'value' field
  4. If OrgWideEmailAddressId does not exist, click the 'New' button
  5. Enter OrgWideEmailAddressId as the value for the 'Label' and the 'SRR Optional Parameter Name' fields
  6. Paste the Id into the 'value' field and then Save

Job done!! Your email notifications should now be sent from this Org Wide Email Address