Programmatically have Notes form e-mailed upon click of a button

I am working in Notes R5 and am trying to programmatically have a Notes form e-mailed upon the click of a button. In other words, the user would fill in the required data, and once the form is complete, they would click a button, which would autosave, then send to each recipient in email field1 and emailfield2 a direct link to that particular record in the Notes database. (There is a unique number on each record.)

<click this button>= emailfield1 and emailfield2, Subject, message,

How would I do this?

You want to use @Mailsend in the button. The button code might look like this:
@MailSend( emailfield1 ; emailfield2 ; ""; 
"A new document has been submitted" ; ""; 

"The new document can be reached using this link." ; [INCLUDEDOCLINK]) ); @StatusBar("Save unsuccessful"))

This code saves the document and if successfully saved, closes the document and sends the message with a link to the document.

Do you have comments on this Ask the Expert question and response? Let us know.

This was first published in July 2005

Dig Deeper on Lotus Notes Domino Application Development

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...