Reset Email Template

The email template consists of the 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. You can edit the email templates as per your requirement using the Edit Email Template API or from the panel.

To restore the email templates to their default values, you can use the Reset Email Template API.

HTTP Request

https://hostname:4085/index.php?act=editemailtemp&temp=TEMP&reset=RESET

Parameters

NameMethodValueDescriptionRequired
actGETeditemailtempThe action will edit the templateYes
tempGETtextThe name of the email template to be resetYes
resetGETtextThe name of the email template to be resetYes

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);

    $post = array();
    $post['reset'] = 'unsuspend_users';
    $post['temp'] = 'unsuspend_users';

    $output = $admin->resetemailtemp($post);

    print_r(json_encode($output));
?>

Output

{
    "title": "Edit Email Template",
    "emailtemp": null,
    "timenow": 1536253321,
    "time_taken": "0.239"
}
Was this helpful to you?