SendTo does not work in WebQuerysave

I have an eventsdatabase (webapplication) where on saving an event some people must receive a mailnotification with an url-doclink.

When saving an event in web, the agent (in WebQuerySave) does not work. Even the event will not be saved.

When saving an event in the notesclient AND running the agent (in QuerySave) everything works perfect.

What do i wrong?

An someone help me please?

Thanks.

I call the agent with this command;

([ToolsRunMacro]; “SendAnnouncementNotify”)

The code in the agent is the Following;

Sub Initialize

Dim ws As New NotesSession

Dim doc As NotesDocument

Dim db As NotesDatabase

Set doc = ws.DocumentContext

Set db = ws.CurrentDatabase

Dim AnnounceSendTo As String

Dim AnnounceFrom As String

Dim AnnounceSubject As String

’ Dim fieldinfo() As String

Dim UrlDocument As String



UrlDocument = doc.EvUrlDoc(0)



Dim email As NotesDocument

Set email = New NotesDocument(db)



email.Form = "Memo"

AnnounceFrom = doc.EvCreatedBy(0)

AnnounceSendTo = doc.EvReaders(0)

AnnounceSubject = doc.EvDescription(0)

email.SendTo=doc.EvReaders(0)



email.Subject ="A new event was submitted by " + " which requires your attention"





email.SaveMessageOnSend = True



Dim bodyItem As NotesRichTextItem

Dim object As NotesEmbeddedObject

Set bodyItem = email.CreateRichTextItem( "Body" )

Call bodyItem.AppendText( "*****************************************************************************************************")

Call bodyItem.AddNewLine( 1 )

Call bodyItem.AppendText("* DO NOT RESPOND TO THE SERVICE MACHINE THAT GENERATED THIS NOTE *")

Call bodyItem.AddNewLine( 1 )	

Call bodyItem.AppendText( "*****************************************************************************************************")

Call bodyItem.AddNewLine( 1 )	

Call bodyItem.AppendText("An event was created")

Call bodyItem.AddNewLine( 1 )

Call bodyItem.AppendText("It was created by: ")

Call bodyItem.AddNewLine( 1 )

Call bodyItem.AppendText("You may read the annoucement by clicking on the link below.")

Call bodyItem.AddNewLine( 1 )

Call bodyItem.AddNewLine( 1 )

Call bodyItem.appendText(UrlDocument )

email.Send( True) 

'@Command

End Sub

Subject: SendTo does not work in WebQuerysave

Change your agent trigger properties to “Agent List Selection” and set Target as “None”.Use ([ToolsRunMacro]; “(SendAnnouncementNotify)”).

Even you can use print statements to print things in web page to se if the agent is running successfully.Even you can also have a look at server console to see if the agent is running fine.

Regards

SKS

Subject: RE: SendTo does not work in WebQuerysave

Thanx for your tip.

I’v modified the agent properties.

The saving of an event now works but the agent still won’t run.

On the Live server console i can’t see the agent running.

Why is the agent not running?

greetings

JS

Subject: RE: SendTo does not work in WebQuerysave

Thanx for your tip.

I’v modified the agent properties.

The saving of an event now works but the agent still won’t run.

On the Live server console i can’t see the agent running.

Why is the agent not running?

greetings

JS