Enable email notifications

Use a Simple Mail Transfer Protocol (SMTP) server with your On-Prem Qt License Server to send email notifications to given email recipients about expiring licenses and connection issues.

The following notification types are supported.

Notification typeDescription
Expiring licensesNotifies about licenses that are about to expire in 1, 5, or 10 days.
Lost connection to the Qt cloudNotifies about On-Prem Qt License Server losing connection to the Qt cloud. Sends an email every day until the connection is re-established. If the connection to the Qt cloud can't be established for 7 days, the On-Prem Qt License Server instance stops serving license reservations to client applications. An email notification is sent that the server is not operational anymore until the connection is established again.

First, set up an internal SMTP server and allow connections from your On-Prem Qt License Server.

Then, to enable the email notifications:

In the qt-license-server.service file:

  1. Enable the email notifications:
    Environment="QLS_EVENTS_EMAIL_NOTIFICATION=yes"
  2. Set up the SMTP environment variables based on your SMTP server configuration.

In the qt-service.xml file:

  1. Enable the email notifications:
    <env name="QLS_EVENTS_EMAIL_NOTIFICATION" value="yes" />
  2. Set up the SMTP environment variables based on your SMTP server configuration.
Environment variableDescription
QLS_SMTP_HOSTThe SMTP server address. Required.
QLS_SMTP_PORTThe SMTP server port. Required.
QLS_SMTP_ACCOUNT_USERNAMEThe SMTP server administrator account username or email. Required.
QLS_SMTP_ACCOUNT_PASSWORDThe SMTP server password. Optional.
QLS_SMTP_ACCOUNT_NAMEThe administrator account display name. Required.
QLS_SMTP_RECIPIENTSA comma-separated list of email addresses to receive the notifications. For example: user1@example.com,user2@example.com. Required.

If you don't provide the password, you can enable the connection while the server is running:

./qt-license-server enable-email-notification --url <URL of the running instance> --pass <SMTP server password>
.\qt-license-server.exe enable-email-notification --url <URL of the running instance> --pass <SMTP server password>

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.