Programming with Reflection

image\rwnprg32.gif SendMail method

 

Syntax object.SendMail Recipient, Subject, ContentType, Content

 

Description

Sends electronic mail via MAPI. This command is available only if you have a MAPI provider installed.

For example, the following command sends the screen contents to becky@address.com using the subject title "Screen Image":

Session.SendMail "becky@address.com", "Screen Image", rcSendScreen, ""

Arguments

Recipient Argument type: String
The e-mail address(es) of the recipient(s).

 To specify more than one address, separate addresses with a semicolon, for example:

      "joe@this.com;don@that.com"

 If this argument is an empty string, your MAPI application opens a dialog box that allows you to specify a recipient. (Depending on your MAPI provider, you may also be able to specify other message options.)

Subject Argument type: String
The text to appear as the subject of the message. If this is an empty string, the message will have no subject.

ContentType Argument Type: Enumeration
A constant specifying the content to be sent. The possible values are:

 rcSendScreen

 Sends the current Reflection screen as the message content.

 rcSendSelection

 Sends the currently selected text as the message content. If no text is selected, an error (rcRteSendMailNoSelection) is reported.

 rcSendClipboardText

 Sends the current Clipboard contents as the message content. If the Clipboard contains no text, an empty message is sent.

 rcSendText

 Sends the text specified in the Content argument.

 rcSendOV400Document

 Sends the text of an open Office Vision/400 document. If there is no Office Vision/400 document currently open, an error (rcRteNoOV400Document) is returned.

Content Argument Type: String
Specifies text to be sent as the message content. The string lenth is limited to 260 characters. This argument is ignored unless ContentType is rcSendText.

Errors

The following errors (in addition to those mentioned above) may be returned: rcRteMAPINotConfigured (MAPI has not been configured on the user's system) rcRteErrorLoadingMAPI (an error occurred loading the MAPI interface), rcRteErrorSendingMail (any other MAPI error), rcRteSendMailNoSelection.

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command