Sending “on behalf of” emails

一笑奈何 提交于 2019-12-03 23:40:52
Uwe Keim

You have three properties in the MailMessage class:

  • From
  • Sender
  • ReplyTo (or in .NET 4 the ReplyToList)

If you set the Sender different than the From, it should behave as you want it.

Please also see this SO posting for other aspects.

This is primarily a client app "feature". I'm guessing that you are viewing these email messages in Outlook, correct? Outlook (and possibly other email clients) compare the FROM address and the actual sender to see if they match. If they don't, Outlook will display the "On Behalf Of" information.

Most other email clients, and all web-based clients that I know of, simply display the "FROM" address as it was provided.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!