Question & Answer
Question
Why is QtmsCreateSendEmail failing with TCP5308 when more than one receipient is set?
Cause
Description of RCPT0100 Format is misleading
Answer
The description of RCPT0100 Format is sometimes misinterpreted:
Offset | Type | Field | |
Dec | Hex | ||
0 | 0 | Binary(4) | Input CCSID |
4 | 4 | Binary(4) | Recipient Type |
8 | 8 | Binary(4) | Offset to recipient address |
12 | C | Binary(4) | Length of recipient address |
Char(*) | Recipient address |
This looks like the recipient address of each recipient is stored after each group of the 4 fixed length integers.
However the Recipient array must be defined as an array of
Type Field
Binary(4) Input CCSID
Binary(4) Recipient Type
Binary(4) Offset to recipient address
Binary(4) Length of recipient address
followed by only one char(*) value initialized with all the recipient
addresses.
So this is an example with two recipients:
Number of recipients = 2
Recipient array:
Offset | Field | Contents |
0 | Input CCSID 1 | 0 = current job CCSID |
4 | Recipient Type 1 | 0 = Normal Recipient |
8 | Offset to recipient address 1 | 32 (*1) |
12 | Length of recipient address 1 | 16 |
16 | Input CCSID 2 | 0 = current job CCSID |
20 | Recipient Type 2 | 1 = Carbon Copy |
24 | Offset to recipient address 2 | 48 (*2) |
28 | Length of recipient address 2 | 27 |
(*1) 32 | Address 1 | ibmkc@us.ibm.com |
(*2) 48 | Address 2 | ibmi_support@ecurep.ibm.com |
The variable length addresses can be in any sequence as long as offset and length are correctly set.
Related Information
[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Communications-TCP","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}},{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1021759