Child pages
  • UAPI Functions - Email::suspend_outgoing

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt
This function rejects outgoing mail for a suspended email account.

 This function does not disable a user's login credentials or access permissions to their email account.

Note
titleNotes:


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titlecPanel or Webmail Session URL


Code Block
languagetext
https://hostname.example.com:2083/cpsess##########/execute/Email/suspend_outgoing?email=username%40example.com

Include Page
LIB:_CallUAPIFromBrowserLink
LIB:_CallUAPIFromBrowserLink


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Suspend outgoing mail for the user's email account.
$suspend_incoming = $cpanel->uapi(
    'Email', 'suspend_outgoing',
    array(
          'email' => 'username@example.com',
         )
);

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink
 


Expand
titleLiveAPI Perl Module


Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Suspend outgoing mail for to the user's email account.
my $suspend_outgoing = $cpliveapi->uapi(
    'Email', 'suspend_outgoing',
    {
        'email' => 'username@example.com',
    }
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink
 


Expand
titlecPanel Template Toolkit


Code Block
languagexml
<!-- Suspend outgoing mail for the user's email account. -->
[% execute('Email', 'suspend_outgoing', { 'email' => 'username@example.com' } ) %]

Include Page
LIB:_TTLink
LIB:_TTLink
 


Expand
titleCommand Line


Code Block
languagebash
uapi --user=username Email suspend_outgoing email=user%40example.com

Include Page
LIB:_UAPICLINote
LIB:_UAPICLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
      "data" : 1,
      "status" : 1,
      "messages" : null,
      "errors" : null
}


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote


Parameters

ParameterTypeDescriptionPossible valuesExample
emailstring

Required

The email account's username.

A valid email account username.

username@example.com

Returns

This function only returns metadata.