If you see "On Behalf Of" among the sender's information displayed by your email client, you are not alone (but you may be uncommon =D). Only a minority of email clients will display a notation referred to as "On Behalf Of" notation under specific circumstances. While not aesthetically pleasing to some users, it is otherwise harmless. This notation is ultimately based on how the email client reads the Sender field in the email headers, which we'll demonstrate below.
A Quick Example
"On Behalf Notation" will display in a format such as:
In this example, the Sender and From fields in the email headers will display as:
What "On Behalf Of" Signifies
Ultimately, the "On Behalf Of" notation highlights the mismatch between the domain used in the Sender field (mail.example.com) and the domain used in the From field (example.com). In the above example, the envelope is sent through the domain mail.example.com, but the message is sent from the domain example.com. The nuance is important as the Sender field is an envelope field and the From is an email header field - each representing different aspects of the message.
Two Choices, One Preferred Resolution
It is important to understand that there is no way for Mailgun to prevent an email client from displaying the "On Behalf Of" notation as long as the domains contained in the Sender and From fields differ. However, ensuring the same domain is used in both fields will eliminate the "On Behalf Of" notation. In our example above, adjusting the From address to firstname.lastname@example.org will remove the "On Behalf Of" notation. An alternative - though less recommended - solution is to add the domain example.com to the account, verify example.com, and maintain the From address of the messages as email@example.com
A Path Less Traveled
A less common scenario that causes “On Behalf Of” notation is when your emails are DKIM-signed with a domain that differs from the domains contained in both the From and Sender fields. As mentioned, this is less common, and it's best to reach out to our support team so that we can analyze your domain’s DKIM authority as well as your email headers.
If you have any questions, please open a support ticket (cool tutorial .gif below) within your Control Panel, and our team will be happy to assist!