Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending "on behalf of" emails

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 [email protected]".

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...

like image 488
CJ-BehalfOf Avatar asked Dec 30 '10 16:12

CJ-BehalfOf


1 Answers

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.

like image 197
Uwe Keim Avatar answered Oct 18 '22 04:10

Uwe Keim