Skip to main content

Name

ec_get_message_code — Returns the current SMTP status code for a message

Synopsis

ec_get_message_code

Description

ec_get_message_code returns the current SMTP code and description associated with a message. The code reflects the status of the message from the point of view of the mail system. It has the form of an SMTP response; a three-digit response code followed by a (possibly multiline) textual description, terminated with canonical line endings (CRLF).

If Momentum were to construct an out-of-band bounce message, this code is used as the reason.

In the following script, the codes are checked on each message and logged.

$log = ec_get_message_code;
ec_log $log;
Was this page helpful?