eidylon
eidylon

Reputation: 7238

ORACLE 11g UTL_SMTP and "Reply To" / "On Behalf Of"

We are using the UTL_SMTP package in ORACLE 11g to send emails from our system on behalf of the users.

It all gets sent out through a common SENDER account to validate against the SMTP server.

We'd LIKE for the emails to appear to come from the user who sent them through the system. Is there a way with the UTL_SMTP package to add one or both of the following properties to the emails sent:

REPLYTO - address to which replies to the message should be directed
ONBEHALFOF - I know Outlook lets you specify this when you send an email, then when the recipient gets it, it shows up as from smtp account on behalf of other user

I think the REPLYTO would be most important, so the recipients can respond to the users who sent the email, but it would be nice to have the ONBEHALFOF too.

Perusing the intellisense and documentation for the package though, I don't see any way to add either these. Is there any way?

Upvotes: 1

Views: 3323

Answers (1)

DCookie
DCookie

Reputation: 43533

See this AskTom question for a way to do it. If there's a header for the "On Behalf Of" field, you should be able to do both, but the "Reply-To" is in the examples.

Here's another example from Tim Hall's Oracle-Base site. See the "Multi Line Emails" section.

It pretty much amounts to brute force writing of the entire message envelope to the SMTP server.

Upvotes: 0

Related Questions