UAPI Functions - Email::get_auto_responder

Description

This function retrieves autoresponder information.

Examples 


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/Email/get_auto_responder?email=user%40example.com

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// Retrieve the autoresponder for user@example.com
$get_auto_responder $cpanel->uapi(
    'Email''get_auto_responder',
    array(
        'email'         => 'user@example.com',
         )
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# Retrieve the autoresponder for user@example.com
my $get_auto_responder $cpliveapi->uapi(
    'Email''get_auto_responder',
    {
        'email'         => 'user@example.com',
    }
);

 cPanel Template Toolkit

<!-- Get a hash of autoresponder data, then display the interval value. -->
[% data = execute( 'Email', 'get_auto_responder', { 'email' => 'user@example.com' } ); %]
[% FOREACH q = data.interval %]
     <p>
         [% q %]
     </p>
[% END %]
  
<!-- Get only the interval value. -->
[% execute( 'Email', 'get_auto_responder', { 'email' => 'user@example.com' } ).data.interval %]

 Command Line

uapi --user=username Email get_auto_responder email=user%40example.com

 

Notes:

  • You must URI-encode values.
  • username represents your account-level username.

 Output (JSON)

{
  "messages": null,
  "errors": null,
  "status": 1,
  "data": {
    "stop": 1410300000,
    "subject": "Autoresponder Subject",
    "charset": "us-ascii",
    "interval": 24,
    "body": "This is an autoresponder message.",
    "from": "User Name",
    "is_html": 0,
    "start": 1410277881
  }
}

 

Note:

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

   

Parameters

Parameter

Type

Description

Possible values

 Example 

email

 string 

Required

The email account name.

A valid email account name on the server.

 For example, user if the email address isuser@example.com. 

user

 temp_charset 

 string

The autoresponder's character set.

 This parameter defaults to us-ascii. 

Any standard character encoding set.

utf-8

 

Returns

Return

Type

Description

Possible values

Example

 is_html 

 Boolean 

Whether the body of the autoresponder message begins with an HTML content type declaration.

  • 1 — Includes an HTML content type declaration.
  • 0 — Does not include an HTML content type declaration.

1

stop

integer

When the autoresponder becomes disabled in Unix time.

A time that is after the start time, in Unix time format.

1410300000

start

integer

When the autoresponder becomes enabled in Unix time.

A time, in Unix time format.

1410277881 

interval

integer

 The amount of time, in hours, that the server waits between autoresponder messages to the same address. 

Any positive integer.

Note:

 A value of 0 indicates that the system sends a message for each email received. 

24

charset

string

The autoresponder's character set.

Any standard character encoding set.

UTF-8

from

string

The contents of the autoresponder message'sFrom: field.

Any string, or a blank value.

User Name

subject

string

The contents of the autoresponder message'sSubject: field.

Any string, or a blank value.

Autoresponder Subject

body

string

The contents of the autoresponder message'sBody section.

Any string, or a blank value.

 This is an autoresponder message. 

 

  • 11 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....