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)


This was last published in March 2001

Dig Deeper on Domino Resources - Part 2

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.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • 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 ...

SearchDataCenter

  • How do I size a UPS unit?

    Your data center UPS sizing needs are dependent on a variety of factors. Develop configurations and determine the estimated UPS ...

  • How to enhance FTP server security

    If you still use FTP servers in your organization, use IP address whitelists, login restrictions and data encryption -- and just ...

  • 3 ways to approach cloud bursting

    With different cloud bursting techniques and tools from Amazon, Zerto, VMware and Oracle, admins can bolster cloud connections ...

SearchContentManagement

Close