Sending a Basic Email

Hi Guys,

Ive been trying to get my form/agent to send an email but have had no luck.

I have a form with a button. When this form submits i want the ‘WebQuerySave’ to call my agent and send a basic email e.g. Hello.

I can get the form to call the agent but my script does not work.

Any ideas on how to send a basic email to Outlook?

Subject: Sending a Basic Email

What is your code? Should be something like:

set doc = db.createdocument

doc.form = “Memo”

doc.subject = “Hello”

call doc.send(false, “joe.bloggs@acme.com”)

Subject: RE: Sending a Basic Email

Hi Dan,

Thanks for your reply. Below is a copy of my code:

Sub Initialize

Dim session As New NotesSession

Dim db As NotesDatabase

Dim names As NotesDatabase

Dim view As notesview

Dim namesView As NotesView

Dim z As String

Dim resetDocID As String

Dim namesDocID As String

Dim resetDoc As NotesDocument

Dim namesDoc As NotesDocument

Dim outp As String



Set db = session.CurrentDatabase

Set doc = db.createdocument

doc.form = "Memo"

doc.subject = "Hello"

Call doc.send(False, "Viraj.Patel@abc.co.uk")

End Sub

I have have tried your code and that does not work either.

Any ideas?

Subject: RE: Sending a Basic Email

Viray,

Can you see what’s on the servers console? If yes, what does it say?

Subject: RE: Sending a Basic Email

Hi Joost,

Thanks for your quick reply.

This is what appears on the server:

HTTP Web Server: Lotus Notes Exception - Unsupported trigger and search in the background or embedded agent [/***.nsf/the next form/OpenForm&Seq=1]

Subject: RE: Sending a Basic Email

You might want to follow this link

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/3ba0580f5ed4d81285256f71007b2c1d?OpenDocument

Subject: RE: Sending a Basic Email

Its not really a mail sending problem - is it?Please check your agent triggers and the response that you want to get.

Joost has pointed you in the perfect direction.

Subject: RE: Sending a Basic Email

Think it will be best if you post here what errors are you getting - you can get them from either the server console or search for them in the server log file (log.nsf).There has got to be an error associated with your agent if it is falling over!

A

Subject: RE: Sending a Basic Email

Hi Arshad & Joost,

The script is now working. I did not set the Trager to None! Simple.

Thanks for your help.