Delivery Failure Report - Going to the wrong user

We have a web application that allows users to send default email messages to customers but when a “Delivery Failure Report” is generated because something is wrong with the recipient address, the user who is send the email does not get the “Delivery Failure Report”. Instead I get the report probably because I am the signer of the agent that creates the email and sends it.

The code to send the mail is fairly simple:

Set db = session.CurrentDatabase

Set mailDoc = New NotesDocument( db )

mailDoc.Form = “Memo”

mailDoc.From =

mailDoc.ReplyTo =

mailDoc.principal =

mailDoc.subject = webDoc.Subject(0)

/ Create the body field here

recipient = webDoc.SendTo

Call Maildoc.Send (False, recipient)

Is there anything that I can do have the report go to user who sends the email?

Subject: The ‘SMTPOriginator’ field is working for us

Hi, we solved using also the SMTPOriginator field.

For example:

    ...

Dim nam As NotesName

Set nam= s.CreateName(mailDoc.ReplyTo(0))

mailDoc.SMTPOriginator= nam.Addr821

    ...

The Delivery Failure Report will go to mailDoc.SMTPOriginator

Regards,

J R

Subject: RE: The ‘SMTPOriginator’ field is working for us

The name show up when sending mail to external email account. Not when replying it.