Can we remove “on behalf of” from the “from address” on Messaging.sendEmail()?

I changed the from email address by setting the OrgWideAddress; but still the email’s from address says

<a href="" class="__cf_email__" data-cfemail="a0cecfd2c5d0ccd9e0d3c1ccc5d3c6cfd2c3c58ec3cfcd">[email protected]</a> on behalf of <a href="" class="__cf_email__" data-cfemail="fb8f9e888fbe969a9297bb8f9e888fd5989496">[email protected]</a>

Can it be changed to a regular email name without “on behalf of”?


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

There is a salesforce knowledge article that covers this.
Go to Setup > Administration Setup > Email Administration > Deliverability
Under the email security compliance section, turn off the SenderID compliance checkbox, and now email vendor / clients will not include the “Send on behalf of”.

Please keep in mind, by enable to comply with Sender ID email protocols. This declares emails as coming from an authorized IP address.

An alternative as well is to enable Email Relaying. What is Email Relaying?
Email relaying is using an email server to send email that did not originate on the email server. Companies set up email relaying to:

  • Route all email through their own email servers to avoid the appearance of email spoofing by Salesforce. Email spoofing is the forging of email headers to make messages appear as if they came from someone other than the original sender.
  • Store copies of all email as required by government regulations in various industries.
  • Apply existing content filters that scan messages for data and content that is not approved to be sent out through company email.
  • Run outbound email through antivirus software before sending it to customers.
  • Append data such as company-wide disclaimers at the bottom of email messages.

You can set up email relaying for Salesforce-generated email by configuring Salesforce to automatically route email through your company’s Simple Mail Transfer Protocol (SMTP) server.

For more information on how to setup Email Relay Please Click Me

Method 2

In order to get the best deliverability without “on behalf”, you will have to use an smtp relay. This can be tricky to set up. Check for a solution. It can also rewrite sender email addresses in case you have partner users sending emails from the platform with a different domain.

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x