MAXMSGSENT statement

Use the MAXMSGSENT statement to control the number of messages to be sent out on a single TCP/IP connection by the SMTP client. This statement is optional; if it is not coded, it defaults to the value of 0, which indicates that no limit is set.

If the statement is coded, the SMTP client closes the current connection when the maximum number of messages has been sent. If there is more mail to send, then the mail is returned to the active queue where eventually a new connection is opened. This statement effects performance; the fewer messages that can be sent, the slower the mail processing.

Guideline: The limit that is set is used for all outbound TCP/IP connections. Also, if the DEBUG statement is enabled, the SYSDEBUG log indicates when a connection is closed due to the maximum number of messages sent.

This statement does not affect the number of messages processed on the batch connection (257).

Syntax

Read syntax diagramSkip visual syntax diagram
   .-MAXMSGSENT 0--.   
>>-+---------------+-------------------------------------------><
   '-MAXMSGSENT nn-'   

Parameters

nn
A decimal number in the range 0 - 2␠147␠483␠647 (MAXINT). Coding the value 0 indicates that there is no limit on the number of messages to send.

A number greater than 2␠147␠483␠647 fails with the error message EZA5649E Invalid MaxMsgSent value: <nn>. This occurs because the value is too large to be stored in a signed 32-bit integer.

The default MAXMSGSENT value is 0, which indicates no limit.

Examples

Set the maximum number of messages to send on a single TCP/IP connection to 1000:
MAXMSGSENT 1000  

Usage notes

Certain vendor servers might limit the number of messages that they can receive. Setting this parameter to match the vendor server can assist in avoiding undeliverable mail.