Send-mail program on z/OS
When the user has completed the Send Mail panel (CSQ4VDP4 for TSO, VD4 for CICS ), the send-mail program (CSQ4TVD4 for TSO, CSQ4CVD4 for CICS ) puts the message on the receiver's mail queue.
To do this, the program uses the MQPUT1 call. The destination of the message depends on how the user has filled the fields in the Send Mail panel:- If the user has specified only a user name, the program first assumes that the name is a nickname, and sends the message to the object defined by that name. If there is no such nickname, the program attempts to send the message to a local queue of that name.
- If the user has specified both a user name and a queue manager name, the program sends the message to the mail queue that is defined by those two names.
The program does not accept blank messages, and it removes leading blanks from each line of the message text.
If the MQPUT1 call is successful, the program displays a message that shows that the user name and queue manager name to which the message was put. If the call is unsuccessful, the program checks specifically for the reason codes that indicate the queue or the queue manager do not exist; these are MQRC_UNKNOWN_OBJECT_NAME and MQRC_UNKNOWN_OBJECT_Q_MGR. The program displays its own error message for each of these errors; for other errors, the program displays the completion and reason codes returned by the call.
Parent topic: Design of the Mail Manager sample on z/OS