%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
INT %HI_MAPI_SendMail(
   TEXT in sendTo,
   TEXT in sendCc,
   TEXT in sendBcc,
   TEXT in subject,
   TEXT in text,
   TEXT in attaches
 )

Parameters
sendTo Receivers of the mail separated by comma (section send TO).
sendCc Receivers of the mail separated by comma (section send CC).
sendBcc Receivers of the mail separated by comma (section send BCC).
subject Subject of the message.
text Text of the message.
attaches Paths 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:

Code MAPI constant
0 SUCCESS_SUCCESS
1 MAPI_E_USER_ABORT
2 MAPI_E_FAILURE
3 MAPI_E_LOGIN_FAILURE
4 MAPI_E_DISK_FULL
5 MAPI_E_INSUFFICIENT_MEMORY
6 MAPI_E_ACCESS_DENIED
8 MAPI_E_TOO_MANY_SESSIONS
9 MAPI_E_TOO_MANY_FILES
10 MAPI_E_TOO_MANY_RECIPIENTS
11 MAPI_E_ATTACHMENT_NOT_FOUND
12 MAPI_E_ATTACHMENT_OPEN_FAILURE
13 MAPI_E_ATTACHMENT_WRITE_FAILURE
14 MAPI_E_UNKNOWN_RECIPIENT
15 MAPI_E_BAD_RECIPTYPE
16 MAPI_E_NO_MESSAGES
17 MAPI_E_INVALID_MESSAGE
18 MAPI_E_TEXT_TOO_LARGE
19 MAPI_E_INVALID_SESSION
20 MAPI_E_TYPE_NOT_SUPPORTED 
21 MAPI_E_AMBIGUOUS_RECIPIENT 
22 MAPI_E_MESSAGE_IN_USE 
23 MAPI_E_NETWORK_FAILURE
24 MAPI_E_INVALID_EDITFIELDS
25 MAPI_E_INVALID_RECIPS
26 MAPI_E_NOT_SUPPORTED 
-1 an 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
 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
 

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .