Child pages
  • UAPI Functions - Mailboxes::set_utf8_mailbox_names
Skip to end of metadata
Go to start of metadata

Description

This function enables or disables UTF-8-encoded mailbox names on Horde and Roundcube webmail for a cPanel user's email accounts.

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Mailboxes/set_utf8_mailbox_names?enabled=1


Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Enable or disable UTF-8 character-encoded mailbox names for user.
$utf8_set = $cpanel->uapi(
    'Mailboxes', 'set_utf8_mailbox_names',
    array(
        'enabled'     => '1',
         )
);


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.
 
# Enable or disable UTF-8 character-encoded mailbox names for user.
my $utf8-set = $cpliveapi->uapi(
    'Mailboxes', 'set_utf8_mailbox_names',
    {
        'enabled'     => '1',
    }
);


Note:

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

 cPanel Template Toolkit
<!-- Check whether user uses UTF-8 character-encoded mailbox names. -->
[% execute('Mailboxes', 'set_utf8_mailbox_names', { 'enabled' => '1', }) %]


Note:

For more information, read our Guide to Template Toolkit documentation. 

 Command Line
uapi --user=username Mailboxes set_utf8_mailbox_names enabled=1


Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 Output (JSON)
{
  "messages": null,
  "errors": null,
  "status": 1,
  "data": {
    "success": 1
  },
  "metadata": {
    "transformed": 1
  }
}


Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

Parameters

ParameterTypeDescriptionPossible valuesExample
enabledBoolean

Required

Whether to enable or disable UTF-8 character-encoded mailbox names.

  • 1 — Enable UTF-8-encoded mailbox names.
  • 0 — Disable UTF-8-encoded mailbox names.
1

Returns

ReturnTypeDescriptionPossible valuesExample
successBooleanWhether the system changed mailbox name setting's status.
  • 1 — Success.
  • 0 — Failure.
1