Email Templates

Use the Email Templates API to list the email templates present on the server. These include content of the email which will be sent to the admin/user when operations such as creation of VPS and deletion of VPS takes place. The API response contains the list of the email templates, which are listed according to their template name.

HTTP Request

https://hostname:4085/index.php?act=emailtemp

Parameters

NameMethodValueDescriptionRequired
actGETemailtempWill return all the email templatesYes

Sample Code

<?php

    require_once('/usr/local/virtualizor/sdk/admin.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Admin_API($ip, $key, $pass);

    $output = $admin->emailtemp();

    print_r(json_encode($output));
?>

Output

{
    "title": "Email Templates",
    "emailtemps": {
        "addvs": {
            "title": "mail_addvs_sub",
            "body": "mail_addvs"
        },
        "admin_addvs": {
            "title": "admin_mail_addvs_sub",
            "body": "admin_mail_addvs"
        },
        "admin_addvs_err": {
            "title": "admin_mail_addvs_err_sub",
            "body": "admin_mail_addvs_err"
        },
        "deletevs": {
            "title": "admin_mail_del_vs_sub",
            "body": "admin_mail_del_vs"
        },
        "admin_del_vs_err": {
            "title": "admin_mail_del_vs_err_sub",
            "body": "admin_mail_del_vs_err"
        },
        "admin_rebuild_vs": {
            "title": "admin_mail_rebuild_vs_sub",
            "body": "admin_mail_rebuild_vs"
        },
        "admin_rebuild_vs_err": {
            "title": "admin_mail_rebuild_vs_err_sub",
            "body": "admin_mail_rebuild_vs_err"
        },
        "createtemplate": {
            "title": "createtemplate_sub",
            "body": "createtemplate_vs"
        },
        "createtemplate_err": {
            "title": "createtemplate_err_sub",
            "body": "createtemplate_vs_err"
        },
        "reset_pass": {
            "title": "login_mail_sub",
            "body": "login_mail_body"
        },
        "suspend_vps": {
            "title": "suspend_vps_sub",
            "body": "suspend_vps_body"
        },
        "unsuspend_vps": {
            "title": "unsuspend_vps_sub",
            "body": "unsuspend_vps_body"
        },
        "suspend_vps_net": {
            "title": "suspend_vps_net_sub",
            "body": "suspend_vps_net_body"
        },
        "unsuspend_vps_net": {
            "title": "unsuspend_vps_net_sub",
            "body": "unsuspend_vps_net_body"
        },
        "suspend_users": {
            "title": "suspend_users_sub",
            "body": "suspend_users_body"
        },
        "unsuspend_users": {
            "title": "unsuspend_users_sub",
            "body": "unsuspend_users_body"
        },
        "billing_warn_abusers": {
            "title": "billing_warn_abusers_sub",
            "body": "billing_warn_abusers_body"
        },
        "billing_warn_users": {
            "title": "billing_warn_users_sub",
            "body": "billing_warn_users_body"
        },
        "billing_invoice_created": {
            "title": "billing_invoice_created_sub",
            "body": "billing_invoice_created_body"
        },
        "rebuildvs": {
            "title": "mail_rebuildvs_sub",
            "body": "mail_rebuildvs"
        },
        "install_webuzo": {
            "title": "install_webuzo_sub",
            "body": "install_webuzo_body"
        },
        "admin_install_webuzo_vs": {
            "title": "admin_install_webuzo_vs_sub",
            "body": "admin_install_webuzo_vs_body"
        },
        "admin_install_webuzo_err": {
            "title": "admin_install_webuzo_err_sub",
            "body": "admin_install_webuzo_err_body"
        }
    },
    "timenow": 1536251967,
    "time_taken": "0.208"
}
Was this helpful to you?