Programming with Reflection

image\rwnprg32.gif SendMail method


Syntax object.SendMail Recipient, Subject, ContentType, Content



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 using the subject title "Screen Image":

Session.SendMail "", "Screen Image", rcSendScreen, ""


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:


 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:


 Sends the current Reflection screen as the message content.


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


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


 Sends the text specified in the Content argument.


 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.


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