Child pages
  • cPanel API 1 Functions - BoxTrapper::messageaction
Skip to end of metadata
Go to start of metadata

 

Description

This function performs an action on a message in the BoxTrapper queue.

Warning:

cPanel API 1 is deprecated. We strongly recommend that you do not use cPanel API 1. However, no equivalent function exists in our newer APIs.

Examples 


 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$boxtrapper_message_action = $cpanel->api1('BoxTrapper', 'messageaction', array('user@example.com', '', 'example.msg', 'deliverall,whitelist') ); // Call the function.


Note:

For more information, read our Guide to the LiveAPI System.

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $boxtrapper_message_action = $cpliveapi->api1('BoxTrapper', 'messageaction', ['user@example.com', '', 'example.msg', 'deliverall,whitelist'] ); # Call the function.


Note:

For more information, read our Guide to the LiveAPI System.

 

 cPanel Tag System (deprecated)


Warning:

In cPanel & WHM version 11.30 and later, cPanel tags are deprecated. We provide this example to help developers move from the old cPanel tag system to our LiveAPI system. We strongly recommend that you only use the LiveAPI system to call the cPanel APIs.

<cpanel Module="BoxTrapper::messageaction( $FORM('account','logdate','queuefile','action') )">
 Command Line
cpapi1 --user=username BoxTrapper messageaction user@example.com '' example.msg deliverall,whitelist


Notes:

  • You must URI-encode these values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to cPanel API 1 documentation or run the cpapi1 --help command. 
  • We introduced this functionality in cPanel & WHM version 56.

 Output (none)

This function does not return output.

   

Parameters

ParameterTypeDescriptionPossible valuesExample
accountstring

Required

The account's email address.

A valid email address on the server.user@example.com
logdatestring

Required

The system does not use this parameter, and will ignore the value.

Any placeholder value.''
queuefilestring

Required

The email message's filename.

A valid filename.example.msg
actionstring

Required

The desired action.

This parameter accepts multiple actions as a comma-separated list.

  • blacklist — Blacklist the sender.
  • delete — Delete the message.
  • deleteall — Delete all messages from the sender.
  • deliver — Deliver the message.
  • deliverall — Deliver all messages from the sender.
  • ignorelist — Add the sender to the ignore list.
  • whitelist — Whitelist the sender.
deliverall,whitelist

Returns

This function does not return output.