×

Email sending configuration (SMTP)

How to configure SMTP

1. In the Admin panel, go to the Partners section
2. Double-click the selected partner — the settings window will open
3. Select the SMTP tab
The SMTP tab is available for partners only.
This tab is used to configure email sending through an external SMTP server.
Here you specify the mail server parameters that the system will use to send notifications, invoices, and other emails.

Configuration parameters

• SMTP Host — SMTP server address
• SMTP Port — SMTP server port
• SMTP Login — username for mail server authentication
• SMTP Password — password for authentication
• SMTP Email — email address from which messages will be sent
• SMTP Security — connection type (No encryption, SSL, or TLS — depending on the server configuration)
Please carefully verify all entered data — email delivery depends on the correctness of these settings.
 

SMTP server test

After entering the parameters, you can test the connection.
The system uses the SMTP (Simple Mail Transfer Protocol) to test connectivity and authentication.
The test process works as follows:
1. The system retrieves the SMTP server address from the request and verifies that it is specified.
2. It retrieves the connection port. If the port is not specified, the default port 25 is used.
3. An SMTP client instance is created, and the connection timeout and debug level are configured.
4. The system attempts to connect to the server:
— if SSL is selected, the ssl:// prefix is automatically added to the server address
— when connecting via SSL, certificate verification is temporarily disabled
5. After a successful connection, the system sends the EHLO command (extended SMTP greeting).
6. The system retrieves the list of supported ESMTP extensions from the server.
7. If TLS mode is selected and the server supports STARTTLS, the system:
— initiates a secure connection
— sends the EHLO command again
8. If the server supports authentication, the system attempts to log in using the specified username and password.

Error handling

If an error occurs at any stage:
— the information is recorded in the error log
— HTTP status code 400 is returned
— an error message is returned in JSON format
Regardless of the test result, the connection is properly closed using the QUIT command.
At the end of the process, the function returns the connection parameters and the test result.
This procedure ensures that the server is reachable, supports the selected encryption type, and accepts the provided credentials.
If the test fails, we recommend rechecking the server address, port, security type, and login credentials.