ec_get_message_size

March 26, 2020 Contributors

Name

ec_get_message_size — Return the size of the current message.

Synopsis

ec_get_message_size

Description

ec_get_message_size returns the size of the current message in bytes. It returns this as a string.

In the following script, the size is checked and if it is greater than 1 megabyte the message is permanently failed.

$n = ec_get_message_size;
if ec_test :value "ge" :comparator "i;ascii-numeric" $n 1048576 {
  ec_action 550 "message too large.";
}