How to Sign Agents

Hi,
I've an agent that sends email to a group. This agent is triggered when a button is clicked in the form (In Notes ONLY).
The agent is in Lotus Script.
When everyone is clicking the button , it is sending the email correctly but it is sending using my name since i'm the siner of the agent.
I want the senders name as 'accounting department'.

In the agent properties second tab I've put 'accouting department' in the run on behalf of.
However, its still sends the email with sender as my name.

How do I do this
please advise
Sridevi
sridevi911Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
HemanthaKumarConnect With a Mentor Commented:
Sorry could not keep pace with this.. I hope you are being helped here.. good luck
0
 
Bozzie4Commented:
"Run on behalf of" should be a Notes id, in the form of cn=name/o=org
0
 
sridevi911Author Commented:
Yes its a notes ID in the hierarchical form. But it is still sending the email with my name as the senders name.

0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
HemanthaKumarCommented:
Is Accounting Department a valid id ? If it is a group it wouldn't consider that as id...

~Hemanth
0
 
sridevi911Author Commented:
No Hemanth its not a group ID. I've given my colleagues ID in the "Run on behalf of"  to test. But Still it is sending email with my name as the senders name.

Thanks
Sridevi
0
 
sridevi911Author Commented:
Also accounting department is a valid ID. Its basically a mail ID of a mail-in database.
0
 
sridevi911Author Commented:
Also I read in the help that using java save method, you can save this agent by signing with any name by running another agent. But i do not know how to do it.
0
 
madheeswarCommented:
if I am running the agent manually triggering from a action button, it should send email with my name. Eventhough u have signed.
Are the users have access to run restricted Lotus Scripts (check in Server document->Security)
0
 
ZvonkoSystems architectCommented:
Hello Sridevi,

you say you you send the mail by LotusScript.
Then you can use a reserved Field to put the sender name.
Like this:

     memo.Principal = "accouting department"

If that does not work, then append the Notes Domain after the user name:

     memo.Principal = "accouting department@yourNotesDomain"

A third option is to put the internet email address of that user:

     memo.Principal = "accouting.department@company.com"



0
 
sridevi911Author Commented:
Here is what I've and it is still not working... This is crazy....

I've used doc2.principal as "accounting department" and "accounting department@notesdomain".. Nothing works.

Sub Initialize
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim view As NotesView
      Dim doc As NotesDocument
      Dim doc2 As NotesDocument
      
      Dim ritem As NotesRichTextItem
      
      Set db = session.CurrentDatabase
      Set doc = session.DocumentContext
      Set view = db.GetView("ACCAll")
      
      Set doc2 = New NotesDocument(db)
      doc2.form = "Memo"
      doc2.Principal = "Accounting Department"
      doc2.SendTo = doc.CPEmail(0)
            
      doc2.Subject = "Customer ID Informaton: "  & doc.CustomerID(0)
0
 
ZvonkoSystems architectCommented:
Are you sure that "Accounting Department" is either a register user name on the server or a Group or a MailIn database name?
0
 
ZvonkoSystems architectCommented:
And it seams that you have to add the Domino Notes Domain after the name:
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/cf86b6c67413c34385256d87005feb71?OpenDocument

Like this:
doc2.Principal = "Accounting Department@YourNotesDomain"

0
 
sridevi911Author Commented:
I've tried everything. But nothing works. Not sure why..


doc2.Principal = "Accounting Department@NotesDomain"
doc2.Replyto = "Accounting Department@NotesDomain"
doc2.from = "Accounting Department@NotesDomainn"
0
 
ZvonkoSystems architectCommented:
Is your "Accounting Department" a person document?
Is that name in both fields, UserName (FullName) and ShortName as first value?

0
 
sridevi911Author Commented:
OK, I've used my colleagues ID to test. But nothing works. It still uses my name as i'm the one who signed the agent.
I've tried all these...
doc2.Principal = "CN=TIFFANY MANN/OU=EMPL/OU=CA/O=IBM"

doc2.Principal = "TIFFANY MANN/EMPL/CA/IBM"

doc2.Principal = "TIFFANY MANN/EMPL/CA/IBM@IBM"

doc2.Principal = "TIFFANY MANN/EMPL/CA/IBM@NotesDomain"


0
 
ZvonkoSystems architectCommented:
I expect this to work:
doc2.Principal = "TIFFANY MANN@IBM"

You can find the Notes Domain name in the GlobalDomain document of the names.nsf where your colleague is listed as person.
0
 
sridevi911Author Commented:
I looked at the domain name in the names.nsf db for my colleague. I specified it as below:

doc2.Principal = "TIFFANY MANN@INotes"

It dosen't work.... This is getting more interesting. The agent runs after clicking a save button in the form.
I asked my colleague to click the button. When he clicks the save button and when the agent runs it sends the email as if he is sending it.
the senders name is his name when he runs the agent.

If I run the agent then the senders name is my name......

0
 
qwaleteeCommented:
Oh, dear.  I think you have something confused.

The Run On Behalf Of is intended only for server-side agents.  From your description, you are using client-side agents.

As to Principal, start small and work your way up.  Create a test agent that is really short:

Sub Initialize
    Dim session as new NotesSession
    Dim db as notesDatabase
    Set db = s.currentDatabase
    Dim doc2 as New notesDocument ( db )
    doc2.form = "Memo"
    doc2.Principal = "TIFFANY MANN@INotes"
    doc2.sendTo = "Some test address hard coded here"
    doc2.Subject = "Test message for PRINCIPAL field"
    doc2.Send False
End Sub

That hsoul be the whole agent.  Once you get it to work and understand how things are consutructed, you can then apply that knowledge to your more specific agent code.
0
 
qwaleteeCommented:
Oh, and FYI, there are two ways to sign an agent with another ID.

1) Get that ID.  IN the DB ACL, grant that ID Designer access to you database, with authority to create public LotuScript agents.  Switch to the ID.  Open the agent.  Save it.

2) Get that ID.  Use the admin client, files tab, select your database, choose Tools -> Database -> Sign.  You probably shoudl also grant that ID access in the ACL.
0
 
sridevi911Author Commented:
I built the small agent exactly as qwaletee described. But still no results.

who ever clicks the save button the senders name is theirs.  Not sure why doc2.principal is not picking up
0
 
sridevi911Author Commented:
at this point of time it dosen't make sense to sign the agent with the desired name i want to becuase, who ever is running the agent,
the senders name is being setted to their name.
0
 
qwaleteeConnect With a Mentor Commented:
Funny, worked fine for me, except for one type (I used s.currentDatabase instead of session.currentDatabase).
0
 
qwaleteeCommented:
sridevi, just wondering, are your clients using Notes R5 with a standard Lotus R5 mail template?
0
 
ZvonkoSystems architectCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Split: HemanthaKumar {http:#11696064} & qwaletee {http:#11697406}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Zvonko
EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.