Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%HI_MAPI_SendMail function


Function
The function %HI_MAPI_SendMail opens a default e-mail client and prepares automatically the message to be sent.
Declaration
Blok kódu
languageesl
themeConfluence
INT %HI_MAPI_SendMail(
   TEXT in sendTo,
   TEXT in sendCc,
   TEXT in sendBcc,
   TEXT in subject,
   TEXT in text,
   TEXT in attaches
 )
Parameters
sendToReceivers of the mail separated by comma (section send TO).
sendCcReceivers of the mail separated by comma (section send CC).
sendBccReceivers of the mail separated by comma (section send BCC).
subjectSubject of the message.
textText of the message.
attachesPaths to attaches separated by comma.
Description
The return value is of Int type (positive numbers represent the errors which are defined in MSDN for MAPISendMail). There are allowed return values:

CodeMAPI constant
0SUCCESS_SUCCESS
1MAPI_E_USER_ABORT
2MAPI_E_FAILURE
3MAPI_E_LOGIN_FAILURE
4MAPI_E_DISK_FULL
5MAPI_E_INSUFFICIENT_MEMORY
6MAPI_E_ACCESS_DENIED
8MAPI_E_TOO_MANY_SESSIONS
9MAPI_E_TOO_MANY_FILES
10MAPI_E_TOO_MANY_RECIPIENTS
11MAPI_E_ATTACHMENT_NOT_FOUND
12MAPI_E_ATTACHMENT_OPEN_FAILURE
13MAPI_E_ATTACHMENT_WRITE_FAILURE
14MAPI_E_UNKNOWN_RECIPIENT
15MAPI_E_BAD_RECIPTYPE
16MAPI_E_NO_MESSAGES
17MAPI_E_INVALID_MESSAGE
18MAPI_E_TEXT_TOO_LARGE
19MAPI_E_INVALID_SESSION
20MAPI_E_TYPE_NOT_SUPPORTED 
21MAPI_E_AMBIGUOUS_RECIPIENT 
22MAPI_E_MESSAGE_IN_USE 
23MAPI_E_NETWORK_FAILURE
24MAPI_E_INVALID_EDITFIELDS
25MAPI_E_INVALID_RECIPS
26MAPI_E_NOT_SUPPORTED 
-1an internal error (e.g. missing library mapi32.dll)
Note
The function was tested for Windows XP (Lotus Notes and Microsoft Outlook Express) and Windows Vista (Lotus Notes).
Example
Blok kódu
languageesl
themeRDark
 ENTRY SEND_MAIL_OnClick
  INT _retCode
  _retCode := %HI_MAPI_SendMail("bconto@ipesoft.sk", "", "", "%HI_MAPI_SendMail", "It was sent through the function", "d:\eagle7_current\c_d2000_workbook.cmd")
 END SEND_MAIL_OnClick