Sending Email On Behalf Of

When you get an email from a yahoo group list, for example, it might say it was sent from yourgroup@yahoogroups.com on behalf of the person who actually sent it.  Both addresses will be included in the message.

This is done in SMTP with the SENDER header.  If the Sender header is present, the email client should identify the mail as being "from" the sender you specify in the SENDER header (they are "the responsible mail submitter"), on behalf of the from-address that you specify in the FROM header.  You can do it with IP*Works! by simply adding the SENDER header (which is not the same as the FROM header) using the OtherHeaders property, ie:

smtp.OtherHeaders = "Sender: sender-address@mydomain.com";
So, to send an email from test@mylist.com on behalf of the someuser@somedomain.com, just say: 
smtp.OtherHeaders = "Sender: test@mylist.com"; 
smtp.From = "someuser@somedomain.com";
smtp.SendTo = "test@nsoftware.com";
smtp.Subject = "SendOnBehalfOf";
smtp.MessageText = "message text";
smtp.Connect();
smtp.Send();
You can use the OtherHeaders property to specify any custom headers you'd like, multiple headers should be separated with a CRLF.
Technorati Tags: ,

Print | posted on Tuesday, February 26, 2008 4:38 PM

Feedback

# re: Sending Email On Behalf Of

Left by StarLight at 12/9/2008 5:40 AM
Gravatar Exactly what I needed to avoid mail from background mechanisms being filtered by m$-outlook spam filter. Thank you!

# re: Sending Email On Behalf Of

Left by GreenEnvy at 12/9/2008 10:26 AM
Gravatar Could the opposite be done, remove the "sender" tag?
Here is the situation. Our organization just switched to Google Apps. We own a few domains and have pulled them into Google Apps as well. So our main domain is www.domain.com as an example. This is what the actual google apps account is.
We then have our other domains added in as aliases, like www.otherdomain.com. This allows our users to receive e-mails sent to either domain, and also they can send out from either domain if we grant them this access.
This works fine for sending directly within Google Apps, e-mails are received showing the chosen "from" address. However, some users have to use outlook or other desktop clients to send. For those people, if they choose to send as a user @ one of the alias domains, Outlook adds the "Sender" field to the header, which causes some recipients to see "from user@domain.com on behalf of user@otherdomain.com".
I know this is done for fighting spam, but since we own both domains and have MX setup properly this should be OK.
So, after that long drawn out explanation, can ipworks be used to delete that sender line from the header?
My basic thought is we'd configure our users on outlook to send to an ipworks server which would remove that header and then pass along the message to google apps.

# re: Sending Email On Behalf Of

Left by Lance at 12/9/2008 10:34 AM
Gravatar Yeah, IPWorks can send email with any header fields and values you want to specify. You can have complete control over the headers if you want to. However, we don't have a pre-built smtp server, so while you could built one with IPDaemon to receive emails and then immediately re-send them, you'd have to do that dev yourself. SMTP is an extremely simple protocol though, so it wouldn't be too tough of a job.

Your comment:





 
 

Copyright © Lance Robinson

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski