|
Example: Receiving Mail | Receiving Mail |
The working tables (placed in the system application _SYSEXT
by default, or according to the InBoxAppl
profile parameter) cannot be changed. Any modification to the structure will cause mail functionality to malfunction. If you need to add columns with additional information, create a new table and relate it to the ID
column.
New records are placed into the tables automatically. You may delete them using the MailBoxDeleteMsg
function with the delrec = TRUE flag or by common database operations.
The Subject
and Body
columns use the system charset. Content of the incoming mails (POP3) will be converted from ISO-8859-2 coding.
Incoming e-mail is stored in the _INBOXMSGS
table (unless changed by the InBoxMessages
profile parameter). If this table does not exist, it will automatically be created when opening a mailbox or when the MailCreInBoXTables
function is called. An application may get the table name and number using the MailGetInBoxInfo
function.
This table has the following format:
Column | Type | Description | ||
1 | ID |
INT | A unique number created by the server. Identifies the mail and is used as a reference to the table of attachments. | |
2 | Subject |
CHAR(80) | Mail subject. | |
3 | Sender |
CHAR (64) | Sender address. | |
4 | Recipient |
CHAR (64) | Recipient address. | |
5 | CreDate |
DATE | Date mail was created (not the time of record insertion). | |
6 | CreTime |
TIME | Time mail was created. | |
7 | RcvDate |
DATE | Date mail was received. | |
8 | RcvTime |
TIME | Time mail was received. | |
9 | Size |
INT | Length of the letter. If zero, the mail does not contain any content. If equal to NONEINTEGER, the mail contains a letter, but the length cannot be determined (without downloading the entire letter) | |
10 | FileCnt |
SMALLINT | Number of attachements. If equal to zero, the mail does not contain any attachments. If non-zero, a count of files is here for Mail602, NONESHORT for others (NULL in SQL), because the exact number of attachments cannot be determined from the mail list (without downloading the entire mail). The count will be filled in when the additional information is downloaded (either by the MailBoxLoad function with the MBL_FILES parameter or by the MailBoxGetFilInfo function). |
|
11 | Flags |
INT | Mail flags | |
1 |
The mail is registered. | |||
4 |
The mail has a low priority. | |||
8 |
The mail has a high priority. | |||
16 |
The mail has "personal" sensitivity. | |||
32 |
The mail has "private" sensitivity. | |||
64 |
The mail has "confidential" sensitivity | |||
512 |
The mail was already opened. | |||
1024 |
The mail is a fax. | |||
2048 |
The mail is in the remote mailbox. | |||
12 | Stat |
CHAR | Mail state | |
0 |
A new mail, the mail appeared in the mailbox after the last call to the MailBoxLoad function. |
|||
1 |
An old mail, information about this mail was received during the previous call to the MailBoxLoad function. |
|||
2 |
The mail is deleted and not longer in the mailbox. | |||
13 | MsgID |
BINARY(64) | A unique ID of the mail that serves for identifying the mail in the mailbox. | |
14 | Body |
CLOB | The body of the letter from the mail, read only for an explicit request (either by calling the MailBoxLoad function with the MBL_BODY parameter of with the MailBoxGetMsgEx function). |
|
15 | Addresses |
CLOB | List of all recipients in the form:
TO: name
and/or CC: name (in "notification" mode)
|
|
16 | Profile |
CHAR (64) | Name of the profile that the record was created. Used when multiple applications download e-mail under different profiles. | |
17 | Header |
CLOB | Mail header. |
The structure of the _INBOXMSGS
table was changed in version 7.0d (the last three columns were added). The conversion to the new structure is done automatically.
Attachments are stored into the _INBOXFILES
table (unless modified by the InBoxMessages
profile parameter). If this table does not exist, it will be created automatically when opening the mailbox or with the MailCreInBoXTables
function. An application may get the table number and name using the MailGetInBoxInfo
function. This table has the following format:
Column | Type | Description | |
1 | ID |
INT | Record ID of the mail from the _INBOXMSGS table. |
2 | Name |
CHAR (254) | Name of the file. |
3 | Size |
INT | Size of the file. |
4 | Fdate |
DATE | File creation date. |
5 | FTime |
TIME | File creation time. |
Example: Receiving Mail | Receiving Mail |