DisplaySent Not Working

I am trying to get my name from not showing up in a mail Sent By or From item when sending the email from an agent using script.

I am using

memoDoc.principal = “Salary Review Database”

memoDoc.DisplaySent = “HR Administrator”

but it still show my name in the Sent By of the email.

Any thoughts.

Subject: DisplaySent works just fine

It’s a computed for display field. It shows you what it’s supposed to show you. You can’t just set it to whatever you want.

-rich

Subject: Display Not Working

You can’t do it like that.First of all, agents should never be signed by you, but by a special agent signer ID with the access rights needed to perform the actions the agents need to do.

Second, Domino will show the true originator of the email, that is part of the security, so the sender can’t easily be falsified.

If you really want to make the email look like it is coming from another address than the true sender, you need to save it directly into mail.box, which is an undocumented solution. You should not attempt that if you don’t know what you are doing.

Subject: RE: Display Not Working

The Principal field can, in fact, be used to set the apparent sender of the document. It is imperative, though, that the Principals’s name end with “@NotesDomain”. See any of Julie Kadashevich’s articles/responses on the subject for more information, but from IBM Developer :

  • doc.Principal=“Joe User/Org@NotesDomain” where Joe User/Org has a Person record with an InternetAddress of your choosing. (Note that the string @NotesDomain must be present.)

  • doc.Principal=“CN=Joe User/O=Org” where Joe User/Org has a Person record with an InternetAddress of your choosing.

  • doc.Principal=User@acme.org@NotesDomain mailto:User@acem.org@NotesDomain. (Note that the string @NotesDomain must be present.)

Subject: RE: Display Not Working

I cannot get this to work, my name still shows up in the ‘Sent By’ in the memo. My users all internal. Here’s my code, can anyone see what I am doing wrong? Much appreciated.

Set mailDoc = New NotesDocument(GlobalDatabase) MailDoc.Form=“Memo”

Set bodyField=New NotesRichTextItem(mailDoc, "Body")			mailDoc.Subject "Test"			mailDoc.SendTo = .CreatedBy(0)

mailDoc.From = GlobalSession.CommonUserName

mailDoc.From = globalDoc.FirstApprover(0)

maildoc.Principal = globalDoc.FirstApprover(0)

maildoc.Principal = "Matthew J Wurzer/WI/USB@NotesDomain"

mailDoc.DisplaySent = ""			mailDoc.tmpDisplaySentBy = ""			maildoc.tmpDisplayFrom_Preview = ""		maildoc.tmpDisplayFrom_NoLogo = ""

Subject: See Karl’s comment earlier…

“If you really want to make the email look like it is coming from another address than the true sender, you need to save it directly into mail.box, which is an undocumented solution. You should not attempt that if you don’t know what you are doing.”

Subject: RE: Display Not Working

As Karl mentioned, the mail will always show the actual sender of the mail - however, I have mail agents in multiple databases, that are sent by a ‘bogus’ user - not me.

Create a user document in your Public Address book → For example one of mine is named ‘Automated Messages/My OU1/MyOU’

Make sure they have rights to run agents (on the server doc)

Make sure that they are listed in the ACL of the database.

When you create the agent, select that user’s name as ‘Run on behalf of’.

That should do the trick!