How to send an email from a Salesforce sandbox to Gmail?

How to send an email from a Salesforce sandbox to Gmail?

On March 2, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on How to send an email from a Salesforce sandbox to Gmail?
How to send an email from a Salesforce sandbox to Gmail

Question

I am trying to send emails from a Salesforce sandbox to a Gmail address, but every attempt results in the following error:

“Unauthenticated email from xyzyxz.com is not accepted due to domain’s DMARC policy.”

All my email addresses in the sandbox use the domain xyzyxz.com, and it seems Gmail rejects these emails due to the sandbox environment. In the production org, there is no issue. I have also set up a verified Organization-Wide Email Address, but that didn’t resolve the issue, and I still face the same error. When I try using a Gmail address as an Organization-Wide Email Address, it leads to a DKIM error.

I need to test email-related functionality that involves outgoing emails, but I’m unsure how to proceed in a sandbox. How can I send emails from a sandbox to Gmail?

Answer

You will likely face issues when trying to send emails from Salesforce sandboxes to Gmail or other major email providers like Yahoo due to the enforcement of DMARC and DKIM policies. These providers block emails from domains that fail authentication checks.

Master Salesforce with expert-led training at CRS Info Solutions in Salesforce training in Hyderabad. Gain hands-on experience in Admin, Developer (Apex), and Integration—join a free demo today!!!

A workaround to bypass this is by using an email service that doesn’t enforce DMARC/DKIM policies strictly. One such service is Yopmail. Yopmail allows the use of temporary email addresses and doesn’t block emails based on the sending domain, even if the email is coming from a Salesforce sandbox with a domain like xyzyxz.com.

Here’s how you can proceed:

  1. Use Yopmail (or a similar service) to test the email functionality.
  2. Send emails from your Salesforce sandbox to the temporary Yopmail address.
  3. Yopmail will display the email, including inline images, which is helpful for testing.

While this approach bypasses the DMARC/DKIM issues, remember that it’s more of a temporary solution for testing purposes. Keep in mind that you cannot rely on Gmail or Yahoo for testing emails from sandboxes, unless you alter your production org’s DMARC/DKIM settings, which is generally not recommended.

Launch Your Salesforce Career in Hyderabad’s Booming Tech Industry

Hyderabad has emerged as a key hub for IT and cloud computing, with Salesforce leading the way in digital transformation. Salesforce training in Hyderabad As more businesses embrace Salesforce for CRM, AI, automation, and seamless integrations, the demand for certified Salesforce professionals is growing exponentially. Major companies like Deloitte, Accenture, Infosys, TCS, and Wipro are actively seeking skilled Salesforce experts, making specialized training a crucial asset for career progression.

If you’re looking to start a successful Salesforce career, receiving the right training is essential. CRS Info Solutions offers top-notch Salesforce institutes in Dilsukhnagar, covering modules such as Admin, Developer (Apex), and Integration. With hands-on learning, real-world case studies, and expert guidance, this program is designed to help you excel in Hyderabad’s thriving job market. Don’t miss out—enroll now and unlock exciting career opportunities in the Salesforce ecosystem!!!

Comments are closed.