Child pages
  • UAPI Functions - Email::dispatch_client_settings
Skip to end of metadata
Go to start of metadata

Description

This function sends an email account's client settings to an email address.

Examples


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Email/dispatch_client_settings?to=user@example.com&account=newuser@example.com



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.
 
// Send the email client settings for newuser@example.com to user@example.com.
$mr_mcfeeley = $cpanel->uapi(
    'Email', 'dispatch_client_settings',
    array(
        'to'              => 'user@example.com',
        'account'         => 'newuser@example.com'
        )
);


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.
 
# Send the email client settings for newuser@example.com to user@example.com.
my $new_email = $cpliveapi->uapi(
    'Email', 'dispatch_client_settings',
    {
        'to'             => 'user@example.com',
        'account'        => 'newuser@example.com'
    }
);


Note:

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

 

 cPanel Template Toolkit
<!-- Send the email client settings for newuser@example.com to user@example.com. -->
[% execute('Email', 'dispatch_client_settings', { 'to' => 'user@example.com', 'account' => 'newuser@example.com' } ) %]


Note:

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

 

 Command Line
uapi --user=username Email dispatch_client_settings to=user@example.com account=newuser@example.com


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. 

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


Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample
tostring

Required

The email address to send client settings.

A valid email address.

user@example.com
accountstring

Required

The email account username or address for which to send client settings.

  • A valid email account username. For example, user to create user@example.com.
  • A valid email address.
newuser@example.com

Returns

This function only returns metadata.