Avoiding confirmation email

I am sending out certain emails to contacts from my dev org. And when a contact replies to the sent email then my configured return address (please see screenshot attached) is proposed as default “To Address”. This all works fine.
But I have requirement, in which, I want to process the email sent by the contact using apex inbound handler. So, I changed my return address to configured salesforce email address. Please see the screenshot. But this will send a confirmation email to this salesforce email address and only after accepting this,it will be reflected in the org. Is there any way to avoid this confirmation email?

enter image description here

Answer

You should be able to “trick” Salesforce into letting you do this with your Inbound Email Service’s failure response settings.

  1. Ensure the Accept Email From setting of your Inbound Email Service does not contain any addresses with the salesforce.com domain in them
  2. Set the Unauthorized Sender Action to “Bounce Message”
  3. Check the Enable Error Routing box and use your personal email address in the Route Error Emails to This Email Address field
  4. Attempt to change your email address in the My Email Settings menu as you are doing in the screenshot in your question

A confirmation email will be sent to the email service address (which will promptly bounce the email because it’s from an unauthorized sender), and you should quickly receive a message at your personal address stating something along the lines of 554 Transaction failed: support@salesforce.com is not authorized to send emails to this service.

The kicker is that the message you receive will have the authorization email attached to it. All you have to do is open the attachment, click on the verification link, and voila! Your change of address is confirmed.

Attribution
Source : Link , Question Author : doga , Answer Author : JCD

Leave a Comment