Description

This function requests that the IMAP Full-Text Search Indexing (powered by Apache Solr™) plugin rescan an email account.


To enable this function, you must install the IMAP Full-Text Search Indexing (powered by Apache Solr™) plugin in WHM's Manage Plugins interface (WHM >> Home >> cPanel >> Manage Plugins). For more information, read our install_dovecot_fts script documentation.

Examples




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



$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Request that the IMAP Full-Text Search Indexing (powered by Apache Solr™) plugin rescan an email account.
$system_filters = $cpanel->uapi(
    'Email', 'fts_rescan_mailbox',
    array(
         'account' => 'username@example.com',
         )
);

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Request that the IMAP Full-Text Search Indexing (powered by Apache Solr™) plugin rescan an email account.
my $system_filters = $cpliveapi->uapi(
    'Email', 'fts_rescan_mailbox',
    {
        'account' => 'username@example.com'
    }
);



<!-- Request that the IMAP Full-Text Search Indexing (powered by Apache Solr™) plugin rescan an email account. -->
[% execute( 'Email', 'fts_rescan_mailbox', { 'account' => 'username@example.com' }) %]



uapi --user=username Email fts_rescan_mailbox account=username%40example.com



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



Parameters

ParameterTypeDescriptionPossible valuesExample
accountstring

Required

The email user's account name.

You must enter a valid email address. Otherwise, the function rescans the default email account.


A valid user email account.username@example.com

Returns

ReturnTypeDescriptionPossible valuesExample
statusBoolean

Whether the rescan initiated.

  • 1 — Success.
  • 0 — Failure.
1