LetterCreate

sql

FUNCTION LetterCreate (IN subj CHAR(80), IN msg CLOB, IN flags INT, OUT letter HANDLE) RETURNS INT;

Parameters

subj subject (will appear in the received mail list)
msg letter message, or the path to the file containing the letter text
flags letter flags WBL_...
letter output parameter - letter handle

Description

This function creates a new letter of the electronic mail designated by the letter parameter. This parameter identifies the letter and other functions (add recipient, attach file etc.) that work with this identifier.

The flags switches:

WBL_READRCPT (= 1) The letter is registered.
WBL_DELAFTER (= 2) The letter will be deleted after it's sent. MAPI doesn't delete sent letters by default and stores them in the folder mail to send.

The following flags specify the letter priority. The default priority is normal.

WBL_PRILOW ( = 4) The letter will be sent with low priority
WBL_PRIHIGH (= 8) The letter will be sent with high priority. The Mail602 user must have the privilege to use the high priority, otherwise the NO_RIGHT (129) error occurs.

The following 3 flags specify the letter sensitivity. No sensitivity is the default state. Mail602 doesn't support letter sensitivity.

WBL_SENSPERS (= 16) The letter will have the "Personal" sensitivity, meaning that the letter doesn't deal with work issues.
WBL_SENSPRIV (= 32) The letter will have the "Private" sensitivity, meaning that the recipient won't be allowed to change the contents of the letter before answering or forwarding the mail.
WBL_SENSCONF (= 64) The letter will have the "Confidential" sensitivity, meaning that the letter should be treated according to the appropriate principles.

WBL_REMSENDNOW (= 128) The letter will be sent to the parental mailing service (in the case of the remote Mail602 client) or to the chosen SMTP server (in set in the Mail602 profile) ASAP.
WBL_MSGINFILE (= 256) If this flag is set, the Msg parameter will be the name of the text file, that contains the letter body, otherwise the Msg parameter will be directly the message body.
WBL_BCC (=512) if the letter contains more recipients, the so-called "blind copies" will be sent (without displaying the other recipients) - only for Mail602
WBL_DELFAFTER (=1024) If no error occurs during the sending, the files attached to the letter will be deleted


Unicode form of this function

LetterCreateW

sql

FUNCTION LetterCreateW (IN subj NCHAR(80), IN msg NCLOB, IN flags INT, OUT letter INT) RETURNS INT;

If the letter should have national characters (in the body or subject) and the server coding is different than, use this function form.



Function value

This function returns 0 if successful, the error number otherwise.

Example

Sending example

See