Removing 'on behalf of' when sending mail using MailGun

后端 未结 4 1733
渐次进展
渐次进展 2021-02-01 17:49

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

4条回答
  •  孤独总比滥情好
    2021-02-01 18:33

    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  ");
    

提交回复
热议问题