Sending email from Web application

I have a page loaded in Browser that has a view embedded with a list and a tickbox on the side of each row and a delete button. Practiccaly what I need to do is to tick a row and when pressing the delete button do the following action:

  1. Send an email to username in field ‘Purch’

  2. Delete the row

For this button I used the following coding:

@Command([ToolsRunMacro];“(notify)”);

@Command([MoveToTrash]);

@Command([EmptyTrash])

This calls an agent called notify with the coding below:

Sub Initialize

Dim s As New NotesSession

Dim db As NotesDatabase

Dim memo As NotesDocument

Dim webdoc As NotesDocument

Set db = s.currentdatabase

Set webdoc = s.documentcontext

Set memo = New NotesDocument(db)

memo.form = “Memo”

memo.SendTo = webdoc.Purch

memo.Principal = “Melvin Degiorgio”

memo.Subject = “This Is a test”

memo.Body = “This is a test”

Call memo.Send(False)

End Sub

Can someone help as this is not working for me. Thanks