I’m developing an inbound email service to parse the email and create records in a custom object. This service was working fine in my developer org, but when I deployed this to a full sandbox for testing, Salesforce bounces the email saying
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:
firstname.lastname@example.org (Undelivered): 551 Failed due to: SenderAuthorization
Initially, the ‘Accept Email From’ was blank (for testing purposes), but it still didn’t work. I added our domain names and then added the specific tester’s email address, still didn’t work. Interestingly, it did work when I sent the email from my email address.
I came across this post,
Now due to a recent change on Salesforce side, our application servers are currently rejecting emails where the envelope-from in the email header has an email in the above format if an email is sent to E2S email address.
but I guess this scenario applies only for “Email to Salesforce”.
Here is the screenshot of my configuration.
How do I solve this?
This is resolved.
Apparently, it looks like there is a setting to restrict the email address / domain in one another place from other than the ‘Accept email from’ setting while defining the email service and this setting is located in the ‘Email Service Address’ page.
This setting had my email address populated (which meant ‘accept emails only from my email address’) and once I removed this, the problem was resolved. When I created the new email service address, it automatically populated my email address which I didn’t notice in staging, but probably removed it in my developer org, which is why it worked in my developer org.