Send on behalf of via SMTP

I would like to modify a program that I have that sends e-mails to an Exchange or Lotus smtp server.  I would like to be able to send the messages "on behalf of" another user rather than the message appearing as if it has actually been sent by the user as it does now.  Does anybody know what I need to add to the message?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>> "on behalf of" another user rather than the message appearing as if it has actually been sent by the user as it does now.

Hmm.. I donot think what you are trying to do is legal ... May be I am misunderstanding your question..

The receiver of the email should get from a genuine user ... Why do you want to send on behalf of somebody else ??

DJWalkerAuthor Commented:

My program is used to send emails internally within an organisation.  It currently allows me to appear to be anyone I choose (ie because it sets the "from:" line in the smtp message).  I would like the e-mails to say - "sent by DJWalker on behalf of Manager" just like normal delegation/send on behalf of.
well why dont you change the From Name as "sent by DJWalker on behalf of Manager" instead of your name or

put a signature like "sent by DJWalker on behalf of Manager" so that everyone will know what you are sending in behalf ..

wont this be a simple solution

Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

DJWalkerAuthor Commented:

I don't think you understand my question. Unless you know about smtp headers you will not be able to answer this question.
As far as I know there is the "Sender" header, which should be the actual sender of the message. Not using correct data
would be spoofing the sender - not quite kosher. I suppose you could do whatever you  like on your internal network, though.

There is also the "From" header, which would be the string you fill in with your proper name in your client when you
set it up.

So you'll have:

From: Stobby Liftoff

The "From" field could be: "Stobby Liftoff on behalf of H. Grinchley" or whatever. The trick may be to be able to change the
field in a simple way. I suppose you could use different "accounts" in your mail client, set up differently. If you send a lot of mail on behalf of a lot of different people, that seems tiresome.

DJWalkerAuthor Commented:


Since posting my original question, I have discovered that if i set the Sender and From fields like so:

Then in Lotus Domino/Notes I get the effect I require - ie the mail appears in the inbox as coming from Administrator but when the mail is opened, it says "sent by Administrator" underneath "From Manager"

In Exchange/Outlook the sender field seems to be ignored and the message is simply from Manager.
Well that seems like a workable solution then?
I get the impression that many Microsoft applications deviate from standards to make it "simpler" for the user. It muddies the picture anytime you want to find out what is really happening...

I suppose you could post a thread in Community Support area to get a points refund, as you seem to have solved the problem yourself.

DJWalkerAuthor Commented:

It's a workable solution for Domino, but it's actually more important that I have the "behalf of" effect for Exchange, so I'm still looking for ideas on getting that to work.

Thanks for your input anyway.
I think it depend on your client, if for instance I'm using POP or IMAP in Outlook and have local addresses, the displayed name for the sender of a message with simply
From:<> will be
Bob could insert his name in the client and I'd get "Bob"
as I would in the first example if I had bob in my address book.

I think if you used
Reply-To:  "Sent by Administrator on behalf of Manager" <>
From: "Sent by Administrator on behalf of Manager" <>
Sender: "Sent by Administrator on behalf of Manager" <>
you might get your desired results, though using the native system might resolve the smtp address and display the 'friendly name, if that's the case you might want to create an alias not in the public director to avoid that, and perhaps even use an alien SMTP relay to eliminate the local mail systen from prettying up the displayed field.

DJWalkerAuthor Commented:

I've spoken to Microsoft support about this problem. It's a bug in Exchange. It's fixed in the post SP3 rollup.

I don't quite see what the bug was - this is using the exchange api's or SMTP?
DJWalkerAuthor Commented:

This was was using SMTP. The bug was that Exchange was not correctly handling the case where 'Sender' and 'From' were different.  The guy from Microsoft said that it was listed as a fix in the SP3 rollup documentation so there might be more information there but I haven't bothered to look. I was happy enough that applying the SP3 rollup fixed the problem.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Software

From novice to tech pro — start learning today.