Web email agent

Hi,I would like to have this code working. It is part of an agent which is called from WebQuerySave. It also does some other stuff like, return a reference number and populated the auditing. This is all on the web. Only, this part of the code isnt working… help :slight_smile:

Dim mdoc As NotesDocument

Dim db As notesdatabase

Dim cdoc As notesdocument

Set cdoc=session.documentcontext

Set mdoc = New NotesDocument( db )

mdoc.Form = "Memo"

mdoc.SendTo= "anastasia.vassili@xyz.com"  

	

mdoc.subject =	"Web Call logged"

mdoc.body = "Please note, call number " + refnum + " has been logged via the Internet. " 

Call mdoc.Send( True)

Subject: Web email agent

Anastasia,

One thing you might try…

Change mdoc.Send(True) to mdoc.Send(False). It seems like you are trying to attach the “Memo” form which is not really needed in this case.

Trey

Subject: RE: Web email agent

And check server log for errors! Or even better add error handling to your agent.

Subject: RE: Web email agent

Its still not working… I changed

Call mdoc.Send(True) to Call mdoc.Send( False)

and the log.nsf shows no errors… What code would i need to add to have some error handling? (i’m still learning LS)

thanks for your help