Can anyone tell me how to send an email fom a web page?

I am having a ot of trouble with this.when my web form saves, I want it tosend a simple message to the person named in the sendto field.My form has the following fields (all populated)

SendTo

CopyTo

BlindCopyTo

Principal

Body

I have tried usingl @mailsend, but it gives inconsitent results, like no body content or ignoring the principal field, and domino help says @mailsend doesn’t work on the web.

I tried putting call source.send in querysave and also in postsave, but tat did nothing at alll.

I looked up webquerysave in help but it says thhe event is fired before a save or sending mail.

How can I do this?

Subject: Can anyone tell me how to send an email fom a web page?

Hi Chris,

WebQuerySave is the one you’re after. If you write a little LotusScript agent and get a handle to the document using DocumentContext, you have access to the document - as submitted. You can then call doc.Send and send the email as required.

-Brendan

Subject: RE: Can anyone tell me how to send an email fom a web page?

it didn’t work - what am i doing wrong?

Sub Initialize

Dim session As New NotesSession 

Dim db As NotesDatabase

Set db=session.CurrentDatabase



Dim doc As NotesDocument

Set doc = session.DocumentContext



Dim newdoc As NotesDocument

Set newdoc=New NotesDocument(db)



newdoc.form=doc.form(0)	

newdoc.SendTo=doc.x_sendto(0)

newdoc.subject=doc.x_subject(0)



Call newdoc.Save(False,False)

Call newdoc.Send(False,SendTo)	

End Sub

Subject: Can anyone tell me how to send an email fom a web page?

The Lotus templates use a MailOptions field to do the actual mailing, and I figure there’s got to be a reason they do it that way.