The following pre-defined MailTemplate keys can be used to configure the self-registration process.

Note: The Mail Configuration has to be done for self-registration mails to be sent.

Template Name Used as Default Value
SENDER_ADDRESS The sender address of the registration mail structr-mail-daemon@localhost
SENDER_NAME The sender name of the registration mail Structr Mail Daemon
SUBJECT The subject of the registration mail Welcome to Structr, please finalize registration
TEXT_BODY The plaintext body of the registration mail Go to ${link} to finalize registration.
HTML_BODY The HTML body of the registration mail <div>Click <a href='${link}'>here</a> to finalize registration.</div>
BASE_URL Used to build the link variable ${concat("http://", application.host, ":", application.http.port)} (see structr.conf)
TARGET_PAGE the target parameter value for the redirection target page name register_thanks
ERROR_PAGE the error parameter value for the error redirection target page name register_error

Technical Note: The visibility flags of these mail templates is irrelevant as the self-registration mail is created as a privileged user.

A special link variable is provided for the TEXT_BODY and HTML_BODY templates and can be output with the usual syntax: ${link}.

Example link: https://support.structr.com/confirm_registration?key=<CONFIRM_KEY>&target=/dashboard&onerror=/register-error

Read-only templates for registration

The following templates exist but should not be changed/created as they would interfere with the regular registration process

Template Name Used as Default Value
CONFIRM_REGISTRATION_PAGE Internal page to confirm the registration /confirm_registration
CONFIRM_KEY_KEY The URL parameter key for the confirmation key key
TARGET_PAGE_KEY The URL parameter key for the redirection target page name target
ERROR_PAGE_KEY The URL parameter key for the error redirection target page name onerror

Graph-Browser

About this article
Last change 2017-12-06
Topics Structr 2.0