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.

SecurityBasicAuth
Request
query Parameters
contents
required
string

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.
Example: contents=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%
email
required
string <email>

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.

Example: email=user@example.com
template
required
string

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.

Enum: "blacklist" "returnverify" "verifyreleased" "verify"
Example: template=blacklist
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/BoxTrapper/save_email_template
Request samples
uapi --output=jsonpretty \
  --user=username \
  BoxTrapper \
  save_email_template \
  email='user@example.com' \
  template='blacklist' \
  contents='To: %25email%25
Subject: Re: %25subject%25

The user %25acct%25 does not accept mail from your address.

The headers of the message sent from your address are shown below:

%25headers%25'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "save_email_template",
  • "module": "BoxTrapper",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}