# Notifications
There are two types of notifications in the PanelAlpha system:
User Notifications - These are either emails sent outside the platform or in-app messages displayed in the client area.
Admin Notifications - These are either email messages sent to admin users or in-app notification pop-ups displayed in the admin panel.
The list of possible notifications is clear and coherent. At first glance, you will find the following information:
Notification Name - Each notification has a tooltip that appears on hover, briefly describing when and where this notification might appear and what details are included in the message.
Type - Notifications are categorized as either email (sent outside the platform) or in-app notifications (displayed within the system).
Status - A toggle allows you to enable or disable individual notifications. When disabled, the notification will not be active or in use.
Actions on a single notification:
- Test Mail - Send a testing message to your email address to see its content in real life (applicable to 'email' notifications only).
- Edit Template - Below, we will describe in detail how to manage and customize the email and in-app notifications.
General actions:
- Export - Select the notifications (their content for translation) that you wish to export and save in a .zip format file. You may export all notifications or restrict the type to email or in-app only. Then select a language for translations if you have more than the default English.
- Import - Select a file with notification translations. Once selected, you will see the structure tree of the uploaded package. Press Import to confirm and upload the package into PanelAlpha. Accepted file types: .zip and .tar.gz.
# Customize the notifications
To customize any of the notifications, simply click on the Edit icon next to it. You will be directed to a form where you can modify the template from scratch.
- Language - Select the language. Note that the language dropdown includes only the languages that have already been implemented inside the platform (see Translations section). If you are sure that you have added a language but it is still not visible on the list here, make sure that you have run the below command to apply the language into the notifications:
docker compose -f /opt/panelalpha/app/docker-compose.yml exec -T api php artisan notifications:sync
- Subject & Content changes - Freely modify the notification subject and text within the message itself. You may use numerous variables to display dynamic information. For more information on Blade Templates used, please refer to its official documentation (opens new window).
List of applicable variables:
Notification Fields
{{ $theme_title }} {{ $theme_name }} {{ $theme_description }} {{ $theme_status }} {{ $theme_version }} {{ $theme_update_version }}
Message Fields
{{ $exception_message }}
Instance Fields
{{ $instance_id }} {{ $instance_name }} {{ $instance_domain }} {{ $instance_url }} {{ $instance_version }} {{ $instance_status }}
User Fields
{{ $client_id }} {{ $client_name }} {{ $client_first_name }} {{ $client_last_name }} {{ $client_company_name }} {{ $client_email_address }}
Other
{{ $date }} {{ $datetime }} {{ $formatted_date }} {{ $formatted_time }} {{ $admin_name }} {{ $app_name }} {{ $app_url }} {{ $signature }} {{ $logo }} {{ $branding_color }} {{ $location }} {{ $unsuspend_service_link }}
You can easily revert the template to the original version by clicking the Reset To Default button. Your changes will be disregarded, and the default template subject and content will be restored.
- Email Viewer - Preview the email message by clicking the Email Viewer button on the right. This will show you a real-life view of the created template, making it easy to visualize how it will appear to recipients. On the screen above, apart from the contents, you may also see customized styles with branded logos in the header and footnotes. (See 'Settings' below, point 3 with details on how to achieve such a look).
# Settings
Under Configuration → Notifications → Settings you can specify the following settings:
General Settings
- From Name - This field is required. Provide a name of the sender here; it will be displayed in the "From" field of application emails.
- From Email - This field is required. Provide a sender's email address which will be displayed in the "From" field of the application emails.
- CC Messages - Add additional email addresses where a copy of the email message will be delivered.
- BCC Messages - Add additional email addresses where a blind copy of the email message will be delivered. "Blind" means the addresses will remain hidden.
Email Provider - Select and configure the email provider settings for successful connection. Supported providers:
- SMTP
- Host - Email host refers to the server or hosting provider.
- Port - Email port refers to a specific port dedicated to handling email traffic.
- Username - Name associated with an email account.
- Password - Password for authentication and accessing an email account.
- SSL Type - Refers to the encryption method (SSL or TLS) used to secure the connection between the email client and server.
- Postmark
- Token - Postmark token refers to the API token used for accessing the Postmark email delivery service.
Test the connection; if successful, continue to the next step, which is Style.
- SMTP
Style - This section allows for customization of:
- Email Signature - The provided email signature will be displayed on every email message. For example use:
--- <br /> Best Regards, <br /> Konrad Keck - <b>PanelAlpha CEO & Founder</b>
- Email CSS Style - This part refers to the use of CSS to apply styling and formatting to the content and design of an email message.
- Email Header - Standardize the email header by providing a default one, for example a logo:
<html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>{{ $app_name }}</title> </head> <body> <table> <tbody> <tr> <td></td> <td class="header"> <img src="{{ $logo }}" style="height: 100px; padding: 8px;"> </td> <td></td> </tr> <tr> <td> </td> <td class="content-email">
- Email Footer - Standardize the email footer by providing a default one; exemplary code to display the copyright notice:
<td> </td> </tr> <tr> <td></td> <td class="footer"> @if ($location !== '') <p style="color: #9494AD; font-size: 1em;"><a href='https://db-ip.com' target="_blank">IP Geolocation by DB-IP</a> was used to locate the device.</p> @endif <p style="color: #9494AD; font-size: 1em;">This is an automated email: please do not reply to this message.</p> <p style="color: #9494AD; font-size: 1em;">© 2023 {{ $app_name }}. All rights reserved</p> </td> <td></td> </tr> </tbody> </table> </body> </html>
For more information on Blade Templates used, please refer to its official documentation (opens new window). Available variables for styles configuration:
{{ $app_name }} {{ $app_url }} {{ $logo }} {{ $branding_color }} {{ $date }} {{ $datetime }} {{ $formatted_date }} {{ $formatted_time }} {{ $signature }}
Automated Emails - Specify the frequency at which automatic email messages are sent. Currently, you can define the frequency for notifications on available instance, plugins, and themes updates for clients and admin users separately. Set the frequency to:
- Daily, Weekly or Monthly
- Never - Select to disable.