LDPage/docs

Search documentation

SUGGESTED FOR YOU187 results

Search published articles · By section

SMTP email, Telegram bot and email templates

Connect an SMTP server so the platform can email customers, set up a Telegram bot that alerts administrators, and customize the content, layout and sending rate of system emails.

What are Connections and Email templates for?#

LDPage sends many automatic emails: welcome and account verification, password resets, payment receipts, support replies, new lead notifications… All of them go through the SMTP server you declare in Admin › Settings › Connections (Kết nối). The same page holds a Telegram bot that alerts your admin team about new customers, orders or support requests. The wording of each email is edited in Admin › Settings › Email templates (Mẫu email).

Required access: the owner, or a staff member with the Settings permission (View to open the page, Edit settings to save changes). The SMTP password and Bot token are encrypted when saved and never shown again; the input only hints at the last few characters followed by (đã lưu).
  1. 1

    Open Admin › Settings. In the menu column of the Platform settings page (Cài đặt nền tảng), choose Connections (Kết nối) under the Integrations group (Tích hợp).

  2. 2

    Each connection is a card: a summary of the active configuration, a status pill (Active — Đang hoạt động, Missing configuration — Thiếu cấu hình, Off — Đang tắt, or Not configured — Chưa cấu hình) and a Configure button (Cấu hình) that opens a dialog.

  3. 3

    SMTP is always on and has no switch, because verification and password-reset emails are mandatory. The Telegram bot has a switch in the card's top-right corner; turning it on before entering any configuration opens the dialog so you can fill it in.

Figure 1. The Connections tab under Integrations: the SMTP card is active with the test environment's server localhost:1026; the Telegram bot card is off, Chat ID 0, Events 7/7, labelled Not configured, with the Message content (Nội dung tin) and Configure (Cấu hình) buttons. Vietnamese UI.

1. Configure SMTP for outgoing email#

  1. 1

    Get the SMTP details from your email provider (Gmail, Amazon SES, Mailgun…). For Gmail, create an App password instead of using your sign-in password.

  2. 2

    Click Configure (Cấu hình) on the SMTP card. Fill in SMTP server (Máy chủ SMTP), e.g. smtp.gmail.com, and Port (Cổng), e.g. 587. These two fields and the From address are required and marked with a red *.

  3. 3

    Choose Encryption (Mã hoá): Automatic by port (port 465 uses SSL, other ports use STARTTLS when the server supports it), SSL/TLS, STARTTLS (required) or No encryption. Typically: port 465 uses SSL/TLS, port 587 uses STARTTLS.

  4. 4

    Enter the Username (Tên đăng nhập) and Password (Mật khẩu) of the sending mailbox. Click the eye icon to reveal what you typed. Leaving Password empty on a later edit keeps the saved password.

  5. 5

    The From address (Địa chỉ gửi) looks like Name <email>, for example LDPage <no-reply@yourdomain.com>. Use an address on a domain your SMTP account is allowed to send from.

  6. 6

    Click Send test email (Gửi email thử). The platform uses the values currently typed (no need to save first) to send an email to the address of the admin account you are signed in with; the result appears in the dialog, green for success, red with the failure reason.

  7. 7

    Once the test succeeds, click Save (Lưu). The SMTP card switches to Active and shows the server, sender address and last update time.

Figure 2. The SMTP dialog: SMTP server, Port, Encryption (Automatic by port), Username, Password with the eye button, From address and the collapsed Guide (Hướng dẫn); Send test email and Save sit in the footer. Captured before saving, using test-environment values (localhost:1026, empty password). Vietnamese UI.
If the .env file used at install time contains SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS and SMTP_FROM, the API copies them into the database only once, when no SMTP configuration exists yet. From then on every change is made in the Connections tab; editing .env has no further effect.

2. Connect a Telegram bot for admin alerts#

  1. 1

    In Telegram, chat with @BotFather, send /newbot and follow the prompts to receive a Bot token.

  2. 2

    Click Configure (Cấu hình) on the Telegram bot card and paste the token into the Bot token field.

  3. 3

    Send any message to the bot (or add the bot to a group and post there). Back in the dialog, click Find (Tìm) next to the Chat ID field (Chat ID nhận thông báo). Chats the bot just received appear as buttons; click one to add its Chat ID. If it says there are no messages yet, message the bot and click Find again.

  4. 4

    You can enter several Chat IDs separated by commas. A Chat ID is a number (groups usually start with -100…) or @channelname.

  5. 5

    Under Notification events (Sự kiện gửi thông báo), click to select or deselect the 7 types: New customer sign-up, New order, Order paid, New support request, Customer replied to a support request, New abuse report, Automatic backup failed. All are selected by default.

  6. 6

    Turn on the Enable switch (Bật) in the bottom-left corner, click Send test message (Gửi tin thử) so the bot messages every Chat ID; the result lists any Chat ID that failed. Finally click Save (Lưu).

Figure 3. The Telegram bot dialog: the Bot token field, the Chat ID field with the Find (Tìm) button, all seven events selected and the Guide expanded; the Enable switch, Send test message and Save are in the footer. The fields only show placeholders, no real token entered and nothing saved. Vietnamese UI.

To change the wording of the messages, click Message content (Nội dung tin) on the Telegram bot card. Pick an event in the list on the left and edit the text with the B, I, U, code and link buttons; click variables such as {{name}}, {{email}}, {{link}} to insert them. The preview is rendered with sample data. Reset to default (Về mặc định) only affects the selected event, Send test (Gửi thử) sends the draft to the saved Chat IDs, and Save (Lưu) stores every edited event. Each template is limited to 3,000 characters.

3. Edit email templates#

  1. 1

    Go to Settings › Email templates (Mẫu email) in the Platform group. The Email templates tab lists system emails by group: Account & security, Payments & plans, Collaboration, Support & moderation, Leads.

  2. 2

    Use the Search email templates… box and the All / Customized / Disabled filter (Tất cả / Đã tuỳ chỉnh / Đang tắt) to find one quickly. Each row shows the recipient (Customer, Administrator, Workspace owner, Invitee).

  3. 3

    The switch at the end of a row enables or disables that email. Emails tagged Required (Bắt buộc) — verification, password reset, sign-in email change… — cannot be turned off.

  4. 4

    Click Edit (Sửa) to open the editor. Pick Tiếng Việt, English or 中文 in the top-right corner; each language is saved separately, and an unedited EN/ZH version uses the automatic translation.

  5. 5

    Edit Email subject, Large heading in the email (leave empty to hide), Content (HTML, with a toolbar for bold, paragraph, list, link…), Action button label if the template has a button, and the Footnote.

  6. 6

    In Available variables, click a variable to insert {{variable}} into the field you were editing, or click #if to insert a conditional block. Variables that do not belong to the template are flagged because they would render empty.

  7. 7

    Check the Preview column (switch between Desktop and Mobile). Click Send test (Gửi thử) to queue a test email to your own address. Click Save (Lưu) when satisfied; Reset to default (Về mặc định) removes the customization for the selected language.

Figure 4. The Email templates tab (22 templates) with three sub-tabs Email templates, Shared layout and Send queue (Mẫu email, Bố cục chung, Hàng đợi gửi); the search box and the All, Customized, Disabled filter. The Account & security group contains several templates tagged Required, whose switches are greyed out; every row has an Edit (Sửa) button. Vietnamese UI.

4. Shared layout and send queue#

  1. 1

    The Shared layout tab (Bố cục chung) applies to every email: Button & link colour, Outer background colour (#RRGGBB format), Show logo in email header, Add [site name] to the subject, Sender name, Reply-To email and Email footer.

  2. 2

    Pick a template in Preview with template to see the layout on a real email, click Send test if needed, then click Save (Lưu).

  3. 3

    The Send queue tab (Hàng đợi gửi) shows every email going through the queue, split by status: Waiting, Sending, Waiting to retry, Failed, Sent (last 7 days kept). Failed emails are retried automatically up to 5 times; after that you can click Resend (Gửi lại) on a single email or Resend all. The Form leads tab tracks webhook delivery and lead notification emails.

  4. 4

    The Sending rate limit card (Giới hạn tốc độ gửi) helps avoid being blocked or flagged as spam by your SMTP provider: turn on Enable limit, set the maximum number of emails per second/minute/hour/day (1–100,000) and Parallel sending (1–50 emails per worker), then click Save limit. Emails over the limit simply wait their turn and are not counted as failures.

Set the limit below your SMTP provider's sending quota (see your SMTP account). Before clicking Resend all, check the SMTP configuration; if the cause has not been fixed, the emails will fail again.

Troubleshooting#

  1. 1

    Wrong username or password: check the Username; Gmail requires an App password.

  2. 2

    Wrong encryption type: port 465 uses SSL, port 587 uses STARTTLS. Set Encryption back to Automatic by port and try again.

  3. 3

    Cannot connect to the server or Server not found: check the host name, port and your VPS firewall (some providers block outbound SMTP ports).

  4. 4

    Server rejected the sender address: the From address must be one your SMTP account is allowed to send as.

  5. 5

    Test refused for clicking too fast: connection tests are limited to 10 per minute; wait a moment and retry.

  6. 6

    Telegram fails for one Chat ID: the recipient must message the bot first; for groups, the bot must still be a member.

SMTP email, Telegram bot and email templatesBack to top
© 2026 LDPage DocsPowered by CMSNT LTDA guide to using LDPage.