Skip to content

Mail Templates

Nicholas K. Dionysopoulos edited this page Dec 22, 2023 · 8 revisions

Who receives email?

Email messages which have a system-wide (Panopticon installation) scope are only sent to users with the Super privilege.

Email messages concerning a site are sent to all users with the Super and Manage privileges. Moreover, they are sent to the users you have chosen to CC, as set up in the site's configuration.

Common CSS

Sending HTML-formatted emails can be tricky. Inline CSS styles will be stripped away by most email clients. Using tables for everything is a pain, and very limited in what you can do.

To work around those problems, Panopticon can insert CSS styles within the <head> element of HTML formatted email. Since the visual editor only lets you edit the <body> content of HTML formatted email the CSS to be added has to be edited separately.

Go to Mail Templates and click on Common CSS in the toolbar to edit the CSS which is added to all HTML-formatted email messages.

The Common CSS is also loaded automatically into the mail template editor. Therefore, what you see is (mostly) what you get. Please keep in mind that most email clients only support a subset of the CSS syntax.

Mail Template Types

Panopticon knows about a number of mail templates. Each one of them is sent on a different occasion.

You can manage the mail templates in the Mail Templates page.

If a mail template is missing the corresponding email is not sent.

Every mail template has a Subject, HTML Content, and Plain Text Content. The Subject is, of course, the subject line of the email message sent. The emails are sent as both HTML formatted email and as plain text email. The HTML Content of a mail template is the HTML-formatted version of the email, whereas the Plain Text Content is the plain text (not formatted text) version. They are defined separately because they are expected to differ ever so slightly in content.

All three content fields — Subject, HTML Content, and Plain Text Content — support variables. The variables are in the form [SOME_THING] (uppercase string enclosed in square brackets). They are replaced before the email is sent.

All mail types support the following variables:

  • [URL] The URL to your Akeeba Panopticon installation

Joomla!™ core update

These email templates are sent in response to Akeeba Panopticon detecting or attempting to install a new Joomla! version on your site.

The following variables are available for all Joomla! core update mail templates:

  • [SITE_NAME] The name of the site related to the Joomla! core update, as defined in Akeeba Panopticon
  • [SITE_URL] The URL to the site related to the Joomla! core update, inferred from the Endpoint URL set up in Akeeba Panopticon.
  • [NEW_VERSION] The new version of Joomla! which was or will be installed.
  • [OLD_VERSION] The old version of Joomla! which will be or has been replaced.

Joomla Core Update: Update found

Key: joomlaupdate_found

Sent when Akeeba Panopticon detects that there is a new Joomla! version available on a site, but it is set up in a way which prevents its automatic installation.

Use this mail type to notify the user that they will need to install the new Joomla! version manually.

This is sent when the Update Director task finds a new update and the site preferences resolve into a situation where the user needs to be notified by email, but the update will not be installed automatically.

Joomla Core Update: Update will be installed

Key: joomlaupdate_will_install

This email type is NOT set up out of the box, i.e. Akeeba Panopticon will not send this email. You can set it up yourself.

Sent when Akeeba Panopticon detects that there is a new Joomla! version available on a site, and it has queued the site for automatic installation of the new version.

Use this mail type to notify the user that the site will be updated automatically.

This is sent when the Update Director task finds a new update and the site preferences resolve into a situation where the update will be installed automatically.

Joomla Core Update: Update installed

Key: joomlaupdate_installed

Sent after Akeeba Panopticon has installed a new Joomla! on a site.

Use this mail type to notify the user that the site has been updated.

This is sent when the Joomla Update task has finished installing an update.

Joomla Core Update: Update failed

Key: joomlaupdate_failed

Sent when Akeeba Panopticon attempted to install a new Joomla! version on a site, but it failed to do so.

Use this mail type to notify the user that the site upgrade has failed. They need to check if the site is functional and upgrade it manually.

This is sent when the Joomla Update task has tried installing an update, but failed.

Additional variables available:

  • [MESSAGE] The error message received during the (failed) update attempt.

Joomla!™ Extensions Update

These email templates are sent in response to Akeeba Panopticon detecting new versions of extensions, and after trying to install these updated new versions of extensions on your Joomla! site.

The following variables are available for all Joomla! extensions update mail templates:

  • [SITE_NAME] The name of the site related to the Joomla! core update, as defined in Akeeba Panopticon
  • [SITE_URL] The URL to the site related to the Joomla! core update, inferred from the Endpoint URL set up in Akeeba Panopticon.

Joomla! Extension Update: Autoupdate Results

Key: extensions_update_done

Sent after Akeeba Panopticon has attempted to install extension updates on your site.

This email is sent after Panopticon has tried installing a batch of extension updates, not for each update individually. The status of each extension update is listed separately in the email.

Since there can be a mix of successful and failed updates, executable logic is required to construct the email template. The results of that executable logic are available in the [RENDERED_HTML] and [RENDERED_TEXT] variables as HTML and plain text respectively.

The HTML output of [RENDERED_HTML] is generated by the file ViewTemplates/Mailtemplates/mail_extensions_update_done.blade.php. You can override this file using the User Code overrides. You can have per-language overrides. For example, to create a Greek (el-GR) override, use the filename mail_extensions_update_done.el-GR.blade.php, i.e. put the language tag between mail_extensions_update_done. and the .blade.php extension.

The plain text output of [RENDERED_TEXT] is generated by the file ViewTemplates/Mailtemplates/mail_extensions_update_done.text.blade.php. You can override this file using the User Code overrides. You can have per-language overrides. For example, to create a Greek (el-GR) override, use the filename mail_extensions_update_done.el-GR.text.blade.php, i.e. put the language tag between mail_extensions_update_done. and the text.blade.php extension.

Joomla! Extension Update: Update Found

Key: extension_update_found

Sent when Akeeba Panopticon has detected a new update is available for one of your installed extensions on your site, but it is configured to not install it automatically, just email you.

Additional variables available:

  • [OLD_VERSION] The version of the extension currently installed on the site.
  • [NEW_VERSION] The new version of the extension available for installation.
  • [EXTENSION_NAME] The name of the extension, as reported by Joomla. Due to limitations of the Joomla! API this is always in the default language, typically English.
  • [EXTENSION_DESCRIPTION] The descriptions of the extension, as reported by Joomla. Due to limitations of the Joomla! API this is always in the default language, typically English.
  • [EXTENSION_TYPE] The Joomla! extensions type: component, module, plugin, template, package, library, or file.
  • [EXTENSION_AUTHOR] The author (company or individual) who made this extension, as reported by Joomla!. This is provided by the developer of the extension and may not be in a language or writing system that you can read.

Scheduled Site Summary

This is the “Scheduled Update Summary” which sends a summary of the available updates for the core CMS and installed software (extensions in Joomla!, plugins and themes in WordPress).

The following variables are available in the mail template:

  • [SITE_NAME] The name of the site, as defined in Panopticon/
  • [SITE_URL] The URL to the site, inferred from the Endpoint URL set up in Akeeba Panopticon.

Since there can be any combination of update availability between core and installed software, executable logic is required to construct the email template. The results of that executable logic are available in the [RENDERED_HTML] and [RENDERED_TEXT] variables as HTML and plain text respectively.

The HTML output of [RENDERED_HTML] is generated by the file ViewTemplates/Mailtemplates/mail_scheduled_update_summary.blade.php. You can override this file using the User Code overrides. You can have per-language overrides. For example, to create a Greek (el-GR) override, use the filename mail_scheduled_update_summary.el-GR.blade.php, i.e. put the language tag between mail_scheduled_update_summary. and the .blade.php extension.

The plain text output of [RENDERED_TEXT] is generated by the file ViewTemplates/Mailtemplates/mail_scheduled_update_summary.text.blade.php. You can override this file using the User Code overrides. You can have per-language overrides. For example, to create a Greek (el-GR) override, use the filename mail_scheduled_update_summary.el-GR.text.blade.php, i.e. put the language tag between mail_scheduled_update_summary. and the text.blade.php extension.

SSL/TLS Certificate Expires Soon

This email is sent when the site's SSL / TLS (HTTPS) certificate is expiring soon, or has already expired.

The following variables are available:

  • [SITE_NAME] The name of the site, as defined in Akeeba Panopticon
  • [SITE_URL] The URL to the site, inferred from the Endpoint URL set up in Akeeba Panopticon.
  • [DATE] The expiration date of the certificate, localised
  • [DATE_FROM] The validity start date of the certificate, localised
  • [CERT_VERIFIED] Does the certificate have a valid signature? Localised Yes / No text.
  • [CERT_HASH] The hash of the certificate
  • [CERT_SERIAL] The serial number of the certificate
  • [CERT_TYPE] The certificate signature type, always in English
  • [CERT_VALID_FROM] The validity start date in YYYY-MM-DD HH:mm:ss format
  • [CERT_VALID_TO] The expiration date in YYYY-MM-DD HH:mm:ss format
  • [CERT_CN] The list of Common Names (domains) the certificate is valid for, as a comma-separated list
  • [CERT_ISSUER_CN] The Certification Authority common name, e.g. Let's Encrypt
  • [CERT_ISSUER_ORG] The Certification Authority organisation name, e.g. R3

Tip: If you want to type out the Certification Authority's full name use [CERT_ISSUER_ORG] [CERT_ISSUER_CN]. This is how browsers present it. Example output: Let's Encrypt R3.

⚠️ This email is sent once per certificate serial number. If you renew the certificate keeping the same serial number – which you should NEVER do, as it will cause problems on your site – you will NOT receive another email when that renewed certificate reaches its expiration date. In theory, this could happen if you use a certificate from a different certification authority which happens to have the same serial number. In practice, this will never happen unless you are managing your own certification authority and mess something up.

Akeeba Backup emails

The “Akeeba Backup: Successful backup” and “Akeeba Backup: Failed backup” emails are sent when Panopticon takes a backup of your site using Akeeba Backup Professional.

The available variables are:

  • [SITE_NAME] The name of the site, as defined in Akeeba Panopticon
  • [SITE_URL] The URL to the site, inferred from the Endpoint URL set up in Akeeba Panopticon.
  • [PROFILE_ID] The (numeric) backup profile ID
  • [BACKUPID] The internal backup ID taken
  • [BACKUP_RECORD] The (numeric) backup record identifier, as seen in Akeeba Backup's Manage Backups page
  • [ARCHIVE_NAME] The name of the backup archive. For multipart archives it's just the last part, with the .jpa, .jps, or .zip extension.
  • [MESSAGE] Only for failed backups. The error message when the backup failed.

⚠️ If a backup completes but is not uploaded to remote storage it is NOT a failed backup by default, therefore the successful backup email will be sent. If you would rather receive an email about an update failure, and lose access to that backup, you have to enable an option in Akeeba Backup to treat update failure as a backup error.

Panopticon Self-update

The “Panopticon: Update found” email is sent when Panopticon detects an update to itself is available for installation.

The available variables are:

  • [NEW_VERSION] The latest Panopticon version available for installation
  • [OLD_VERSION] The currently installed Panopticon version

⚠️ This email is sent once per version and only to Super Users.

Clone this wiki locally