I\'m trying to figure out how to send mails using the MailGun Golang API without having it sent \'on behalf of\'.
This is how the From address currently looks (where f
To add to Dhodgin's answer:
The on behalf of
message comes up if you're using a subdomain in MailGun such as mail.bar.com
and the from email address is using a different domain such as john@foo.com
To fix this issue add a custom MIME header "sender" and set it to be the same as the from email address.
To add a custom header using the MailGun api make sure to add a h:
prefix such as:
request.AddParameter("h:sender", "John Smith ");