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.

Authorizations:
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).
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

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

Request samples

uapi --output=jsonpretty \
  --user=username \
  BoxTrapper \
  save_email_template \
  email='user@example.com' \
  template='blacklist' \
  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%'

Response samples

Content type
application/json
{
  • "apiversion": 3,
  • "func": "save_email_template",
  • "module": "BoxTrapper",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}