Sending “on behalf of” emails

邮差的信 提交于 2019-12-12 08:23:36

问题


I have been received a lot of emails "on behalf on". For example, the AddThis plugin sending a email from "addThis.com on behalf of myfriend@gmail.com".

How do I do this in C#/ASP.NET? Also, does this work if we use gmail for our SMTP, albeit branded to our company domain?

I'm also wondering if there are any concerns about this being unprofessional or getting flagged as spam on the client PC? In other words, have you guys actually implemented this...


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4564466/sending-on-behalf-of-emails

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