# SMTP settings

### **SMTP settings for sending mail** <a href="#id-12f60oy4n5qz" id="id-12f60oy4n5qz"></a>

An SMTP server is used to send automatic notifications to customers (request statuses, password recovery, verification information, 2-factor code for admin panel login, etc.). There is a page in the admin panel **SMTP Configuration**, where you can specify parameters yourself for the correct operation of mail messages. A detailed instruction for setting up SMTP mail is presented in the next subsection of the documentation.

**Configuration fields**

**1. Host (SMTP Host)**

👉 This is the address of the mail provider's server through which your site will send emails.

🔹 Where to get it:

* In the dashboard of the mail service (for example: Brevo, Gmail, Mailgun, SendGrid, Amazon SES).
* Each service has its own.
  * For Brevo: smtp-relay.brevo.com
  * For Gmail: smtp.gmail.com
  * For Mailgun: smtp.mailgun.org

#### **2. Port (SMTP Port)** <a href="#id-32nlghn44jwv" id="id-32nlghn44jwv"></a>

👉 The number that indicates which "channel" the site uses to connect to the mail server.

🔹 Where to get it:

* Usually specified in the mail service's documentation.
* The most popular:
  * 587 — standard port with TLS encryption.
  * 465 — port with SSL encryption.
  * 25 — old port (often blocked by providers).

#### **3. Username (Username)** <a href="#id-5cmokce0ua95" id="id-5cmokce0ua95"></a>

👉 This is the login for connecting to SMTP.

🔹 Where to get it:

* In most services — this is your email or a service login.
* For example: <83193ss00@smtp-brevo.com>.

#### **4. Password (Password / SMTP Key)** <a href="#ttx17iqd92xs" id="ttx17iqd92xs"></a>

👉 The password for the mail account or a special API key.

🔹 Where to get it:

* In the mail service settings (usually in the *SMTP & API*).
* Some services do not allow using the "regular mail password" — you need to generate a separate SMTP key.
  * In Gmail → "App passwords"
  * In Brevo → "SMTP & API keys"
  * In Mailgun → "Domain settings → SMTP credentials"

#### **5. Encryption (Encryption)** <a href="#id-2sp122n7s8j3" id="id-2sp122n7s8j3"></a>

👉 The method of securing the connection.

🔹 Where to get it:

* Usually the service itself indicates which option to use.
* By default:
  * **TLS** (with port 587)
  * **SSL** (with port 465)

#### **6. From Address (From Address)** <a href="#w9j6q98sjr7p" id="w9j6q98sjr7p"></a>

👉 The email from which messages will be sent to your users.

🔹 Where to get it:

* Any of your working email addresses configured on your domain.
* Example: <noreply@your-domain.com>.
* ⚠️ Important: to prevent emails from going to "spam", it's better to use email with the same domain as the site.

#### **7. From Name (From Name)** <a href="#p948tvcobdha" id="p948tvcobdha"></a>

👉 The name the user will see in the email.

🔹 Where to get it:

* You can come up with it yourself.
* It's better to specify the site or service name so the email looks official.
* Example: demo.lara-script.com or Your exchanger.

#### **Verification after filling** <a href="#id-10zu92qjxclg" id="id-10zu92qjxclg"></a>

After saving the settings you will be able to check correct operation by creating a request on the web part of the site from already existing exchange directions, but be careful: to prevent emails from arriving empty, you need to configure Email messages in the admin panel — that is, the exact text that will be sent in different provided situations. Go to Settings - Email Messages and following the documentation fill the fields with text - <https://lara-script.gitbook.io/docs/ru/funkcional-admin-paneli/nastroiki/email-uvedomleniya>

* If the email arrived — SMTP works.
* If an error occurs — you need to check the username/password, port or whether the required encryption is enabled.

### **How it works** <a href="#id-7dfrv060ww56" id="id-7dfrv060ww56"></a>

After configuring SMTP all system messages will be sent to customers automatically:

* 🔑 **Password recovery** (a link to reset the password is sent to the user's email).
* 📩 **Request statuses** (for example: "request successfully created", "request completed").
* 🛡️ **Verification** (emails with confirmation or document verification status).
* 📢 **Important notifications** (for example, policy updates or account changes).
* 🗝 **Two-factor code** (the code sent to your email when logging into the admin panel provided that you have enabled the [two-factor authentication](https://lara-script.gitbook.io/docs/ru/funkcional-admin-paneli/nastroiki-administratora/dvukhfaktornaya-autentifikaciya))<br>

### **Why it's useful** <a href="#wbh0fbfrohnc" id="wbh0fbfrohnc"></a>

* **Automation of communication with customers** — the system sends all necessary messages by itself without administrator involvement.
* **Increased trust** — users see a familiar address and domain, which reduces the risk of phishing.
* **Convenience for customers** — they are always aware of the status of their actions on the platform
