posts - 598 , comments - 849 , trackbacks - 247

My Links

News

qrcode

Lance Robinson

Create Your Badge

Lance Robinson is a software engineer in Durham, Chapel Hill, Raleigh, and surrounding areas. More about Lance.

 Subscribe

Tag Cloud

Archives

Post Categories

Blogs

Miscellanous

Noteworthy Stuff

Popular Posts

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 | Filed Under [ Programming ]

Feedback

Gravatar

# re: Sending Email On Behalf Of

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

# re: Sending Email On Behalf Of

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.
12/9/2008 10:26 AM | GreenEnvy
Gravatar

# re: Sending Email On Behalf Of

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.
12/9/2008 10:34 AM | Lance
Gravatar

# re: Sending Email On Behalf Of

Great! I need to use this. I am planning to build a bulk email application for clients.

I have yet to try it, though. Hope it works.
9/18/2010 9:19 AM | Steve Cameron
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

Powered by: