v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
BoxTrapper
Spam Prevention (BoxTrapper)

Save BoxTrapper message template contents

This function saves the contents of a BoxTrapper message template.

Important:

When you disable the Receive Mail role, the system disables this function.

get/BoxTrapper/save_email_template

Query parameters

contentsstring required
Example:To: %email% Subject: Re: %subject% The user %acct% does not accept mail from your address. The headers of the message sent from your address are shown below: %headers%

The template file's contents.

You can use variables in the template to include details about the original message.

Important:

  • You must include To: %email% in this parameter's value.
  • If you use the verify template, you must include Subject: verify#%msgid% in this parameter's value.
  • This value cannot exceed four kilobytes (KB).
  • You must URI-encode this parameter's value when using the CLI.
emailstring email required
Example:user@example.com

The account's email address.

Warning:

If you call this function in Webmail, the system overrides this parameter.

Note:

This parameter defaults to the current email address.

template'blacklist' | 'returnverify' | 'verifyreleased' | 'verify' required
Example:blacklist

The message template.

  • blacklist
  • returnverify
  • verifyreleased
  • verify

Important:

If you use the verify template, you must include Subject: verify#%msgid% in this parameter's value.

Note:

For more information about each template, read our BoxTrapper documentation.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "save_email_template",
  "module": "BoxTrapper",
  "result": {
    "status": 1
  }
}