Description

This function returns the count of outbound email messages held in the mail queue for the specified email account.

Examples




https://hostname.example.com:2083/cpsess##########/execute/Email/get_held_message_count?email=username%40example.com



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// List the number of queued outbound messages for the specified email address.
$emails = $cpanel->uapi(
    'Email', 'get_held_message_count'
    array(
        'email' => 'username@example.com',
        )
);



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# List the number of queued outbound messages for the specified email address.
my $emails = $cpliveapi->uapi(
    'Email', 'get_held_message_count'
    {
        'email' => 'username@example.com',
    }
);



<!-- List the number of queued outbound messages for the specified email address. -->
[% execute('Email', 'get_held_message_count', { 'email' => 'username@example.com' } ) %]



uapi --user=username Email get_held_message_count email=username@example.com



{  
  "data": 0,
  "errors": null,
  "messages": null,
  "status": 1
}



Parameters

ParameterTypeDescriptionPossible valuesExample
emailstring

The email address to query.

A valid email address that the cPanel account owns.

username@example.com

Returns

ReturnTypeDescriptionPossible valuesExample
datainteger

The number of messages currently held in the mail queue.

A positive integer.

This function returns a 0 value when no messages exist in the queue.


0