Loading
Salesforce now sends email only from verified domains. Read More
Identify Your Users and Manage Access
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Identify Verified Email-Sending Domains

          Identify Verified Email-Sending Domains

          To identify the email-sending domains that require verification, use Salesforce Object Query Language (SOQL) and Tooling API. Query your DomainKeys Identified Mail (DKIM) keys and your authorized email domains.

          Required Editions

          User Permissions Needed
          To use the Developer Console: API Enabled AND View All Data
          To use Query Editor and run SOQL on the Query Editor tab: API Enabled

          Follow these steps to find the email-sending domains configured in your org. To check whether Salesforce can send email from a specific domain, see Check the Verification Status of an Email-Sending Domain.

          Note
          Note These instructions run two queries with the Developer Console, but that’s not the only viable method to run the queries. Another common method is to use Postman to run a REST API query. See Connect Postman to Salesforce API Quick Guide and Use REST API on Trailhead. Or work with your Salesforce developer to run these queries.

          Access the Query Editor in the Developer Console

          Use the Query Editor in the Developer Console to run SOQL and Tooling API queries.

          If you're new to the Developer Console, see Developer Console Basics in Trailhead, or work with your Salesforce developer to run these queries.

          1. Open the Developer Console.
            • In Lightning Experience: Click the quick access menu (Gear icon), and then click Developer Console.
            • In Salesforce Classic: Click Your Name, then click Developer Console.
          2. Click the Query Editor tab.
            Developer Console with the Query Editor tab

          Query DKIM Keys

          To review your DKIM key configurations, query the EmailDomainKey object via standard SOQL.

          1. Access the Query Editor in the Developer Console.
          2. Paste your SOQL query in the Query Editor.

            Here are example SOQL queries for EmailDomainKey. For the full list of fields for this object, see Email Domain Key in Object Reference for the Salesforce Platform.

            List all DKIM keys, including their status.

            SELECT Id, Domain, Selector, IsActive, TxtRecordsPublishState
            FROM EmailDomainKey
            ORDER BY Domain

            List only active DKIM keys.

            SELECT Id, Domain, Selector, IsActive, TxtRecordsPublishState
            FROM EmailDomainKey
            WHERE IsActive = true
            ORDER BY Domain

            List only inactive DKIM keys.

            SELECT Id, Domain, Selector, IsActive, TxtRecordsPublishState, CreatedDate
            FROM EmailDomainKey
            WHERE IsActive = false
            ORDER BY Domain
          3. Click Execute.
          4. Review the results in the results table.

            Here’s an example output of running the query to list all DKIM keys.

            Query results

          Query Authorized Email Domains

          The AuthorizedEmailDomain Tooling API object tracks the email domains in the Authorized Email Domain list in Setup. Query this object via Tooling API, not standard SOQL.

          1. Access the Query Editor in the Developer Console.
          2. Next to the Execute button, select Use Tooling API.
          3. Paste your query in the Query Editor.

            Here are example Tooling API queries for AuthorizedEmailDomain. For the full list of fields for this Tooling API object, see AuthorizedEmailDomain in Tooling API Developer Guide.

            List all authorized email domains.

            SELECT Id, DomainName, IsDomainOwnershipVerified, IsEmailVerificationRequired, CreatedDate, CreatedById
            FROM AuthorizedEmailDomain
            ORDER BY DomainName

            List only authorized email domains that are verified.

            SELECT Id, DomainName, IsDomainOwnershipVerified, IsEmailVerificationRequired, CreatedDate, CreatedById
            FROM AuthorizedEmailDomain
            WHERE IsDomainOwnershipVerified = true

            List only authorized email domains that are unverified.

            SELECT Id, DomainName, IsDomainOwnershipVerified, IsEmailVerificationRequired, CreatedDate, CreatedById
            FROM AuthorizedEmailDomain
            WHERE IsDomainOwnershipVerified = false
          4. Click Execute.

            Here’s an example output of running the query to list all authorized email domains. “Use Tooling API” is selected.

            Query results

          Interpret Your Query Results

          Use your query results to identify verified domains and act on incomplete or outdated domain configurations.

          To get a list of all verified domains, combine the query results for active DKIM keys and for authorized email domains that are verified.

          To identify email-sending domains for which setup is incomplete, combine the query results for inactive DKIM keys and for authorized email domains that are unverified.

          1. For each query, copy the query results from the Developer Console.
            There’s no export option in the Developer Console. If your query returns a large number of domains, use this method to extract the results or use REST API.
            1. Right-click on any record in the results grid, and then select Inspect.
            2. Find the <table> or the <div> tag that contains grid-table.
              The CTRL+F (Windows) and CMD+F (Mac) shortcuts open the find dialog.
            3. Right-click that element and select Copy, then select Copy Element.
          2. For each query, paste the results into a file of your choice.
            1. To paste the results into an Excel spreadsheet, right-click a cell, select Paste Special, and select Unicode Text.
            2. If you don’t have Excel, paste the HTML table into a file and convert it to another format. AI tools can help you perform that conversion.
          3. For each file, manually add the column headings.
            The column headings aren’t included in the copied data.
          4. Combine or compare the data.

            The domain is in the EmailDomainKey object Domain field and in the AuthorizedEmailDomain Tooling API DomainName field.

          To send email from an unverified domain, activate the DKIM key, set up an active DKIM key, or verify the authorized email domain. See Create a DKIM Key and Verify Your Email-Sending Domains.

          Note
          Note Because a DKIM key improves the deliverability of your emails, Salesforce recommends DKIM keys over authorized email domains whenever possible.
           
          Loading
          Salesforce Help | Article