1 | File name | Input | Char(*) |
2 | Length of file name | Input | Binary(4) |
3 | Originator address (SMTP) | Input | Char(*) |
4 | Length of originator | Input | Binary(4) |
5 | First recipient address (SMTP) | Input | ADDT0100(*) |
6 | Total number of recipients | Input | Binary(4) |
7 | Error code | I/O | Char(*) |
You can use the Send MIME Mail (QtmmSendMail) API to send e-mail from an IBM® i program. The QtmmSendMail API supports sending multiple mail attachments at one time, but the Send Distribution (SNDDST) command does not.
The QtmmSendMail API works in the following way:
The MIME integrated-file-system file must exist for the duration of the QMSF framework pass. The conversion and delivery exit points that are called by the QMSF job must be able to read this file. A built-in exit program removes (unlinks) the link. If this is the last link, the framework deletes the file.
The character string of the integrated-file-system file name of the ASCII MIME note. You must specify the entire path. After the framework finishes processing the file, it unlinks the file. If this is the last link, the framework deletes the file. This file must contain an Internet-ready MIME note that adheres to the standards that are called Request for Comment (RFC).
The number of bytes in the file name (the absolute path name). The maximum length is 255 bytes (no NULL that is assumed at the end).
The character string of an SMTP originator address; for example, smith@myhost.mytown.com. All SMTP addresses should be in coded character set identifier (CCSID) 500.
The length of the originator address string (not including any NULL). The maximum length is 256 bytes.
The first address structure that contains a recipient address. All SMTP addresses should be in CCSID 500.
The number of recipient address structures (there must be at least one).
The structure that returns error information.
For detailed descriptions of the fields, see Field Descriptions.
Offset | Type | Field | |
---|---|---|---|
Dec | Hex | ||
0 | 0 | BINARY(4) | Offset to next address structure |
4 | 4 | BINARY(4) | Address length |
8 | 8 | CHAR(8) | Address Format name |
16 | 10 | BINARY(4) | Distribution type |
20 | 14 | BINARY(4) | Reserved |
CHAR(*) | Address |
Offset to next address structure. The number of bytes from the beginning of this address structure to the beginning of the next one. It must be at least the size of the fixed part of this address structure and the recipient address length.
Address length. The length in bytes of the SMTP address. The maximum length is 256 bytes. This maximum length is determined by Internet standards.
Address Format name. The characters that identify the particular structure. (Current value ADDT0100). It is used for level control of the structure.
Distribution type. The type of recipient. Possible values are:
0 | Normal |
1 | Carbon copy |
2 | Blind carbon copy |
Reserved. This field is reserved and must be set to 0.
Address. The actual SMTP address (no NULLs included). All SMTP addresses should be in CCSID 500.
Message ID | Error Message Text |
---|---|
CPFA0A9 | The object was not found. |
CPFA0CE | The path name parameter that was specified resulted in an error. |
CPF3C12 | The length of data is not valid. |
CPF3C17 | An error occurred with input data parameter. |
CPF3C21 | The format name (name) is not valid. |
CPF3C39 | The value for the reserved field is not valid. |
CPF3C75 | An error occurred with entry lengths and offsets parameter. |
CPF3C88 | The number of variable length records &1 is not valid. |
CPF3E0A | The resource limits were exceeded. |
[ Back to top | Office APIs | APIs by category ]