Q
Problem solve Get help with specific problems with your technologies, process and projects.

@mailsend function

I am trying to compose a mail within a script and I am unable to utilize the @mailsend function. I cannot find an equivalent scripting function. We are running on version 4.63 here. I have come across some working code with "send_email" in it. This appears to be the correct functionality in that you can create the mail in the background and the user composing the original document never sees or interacts with the mail being sent. Unfortunately, the LotusScript compiler does not like the "send_email" command. Any ideas?
The method you need is the Send Method of the NotesDocument Class. The method has the format

 Call notesDocument.Send( attachForm [, recipients ] )

Parameters attachForm Boolean. If True, the form is stored and sent along with the document. If False, it isn't. recipients String or array of strings. Optional. The recipients of the document, which may include people, groups, or mail-in databases. Ignored if the document contains a SendTo item, in which case the document is mailed to recipients listed in SendTo. Required if the document does not contain a SendTo item. --------------------------------------- If you are sending to a Notes client, it is also imioportant to set certain fields so the IsSummary property is true. If you don't do this, the values will not be displayed in the view. I've included a bit of LotusScript to populate a simple memo below. Either the SendTo or CopyTo field must be populated for the memo to be sent.

 Dim item As NotesItem Dim docMemo as NotesDocument Dim rtiBody As NotesRichTextItem Dim db as NotesDatabase Dim session As NotesSession Set session = New NotesSession Set db = session.CurrentDatabase Set docMemo = New NotesDocument(db) Set item = New NotesItem(docMemo, "Form", "Memo") item.IsSummary = True Set item = New NotesItem(docMemo, "SendTo", "Your Reciipients Name Here") Set item = New NotesItem(docMemo, "CopyTo", session.CommonUserName) Set item = New NotesItem(docMemo, "Subject", "Your Subject goes here") item.IsSummary = True Set rtiBody = New NotesRichTextItem(docMemo, "Body") Call rtiBody.appendtext("The body of your message can be formatted using a richtext item. ") Call rtiBody.addnewline(2) Call rtiBody.appendtext("This will allow you to easily format the text with line breaks ") Call rtiBody.appendtext("and other formatting. You can even include links.") Call rtiBody.appenddoclink(db, "DB that generated this memo.") Call rtiBody.addnewline(1) Call docMemo.Send(False)


Dig Deeper on Domino Resources - Part 2

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close