Docs / Tilda

Send email from Tilda over SMTP

Tilda can send through an external SMTP server in three places: customer order notifications, Members Area emails, and one-off emails to leads from Tilda CRM. Form submissions are not on that list — Tilda sends those itself, and there is no way to plug in your own server.

This guide sets up each of the three and shows the workaround for forms when submissions have to come from your own domain.

✓
You can get them on the token management page. For security reasons, a token is shown only once — at the moment it is created.

SMTP connection settings

SettingValue
SMTP hostsmtp.postwing.app
Port465
EncryptionSSL/TLS (implicit, encrypted from the first byte)
UsernameThe login of an SMTP token for your domain
PasswordThe password of that token — shown once, when the token is created
ℹ
Every mode is also available on a high port: 8465 (SSL/TLS), 8587 (STARTTLS) and 8025 (plain). Many hosting providers and clouds block outbound 25, 465 and 587 — if the connection times out, switch to the matching high port.
ℹ
Every example in Tilda's help uses port 465 with SSL. Use the same pair: the connection is encrypted from the first byte, so there is no STARTTLS negotiation to go wrong.

Order notifications

Go to Site Settings → Payment Systems → General payment settings, find the customer order notification settings and choose to send through your own mail server rather than SendGrid:

FieldValue
Outgoing mail server (SMTP)smtp.postwing.app
Port465
Connection securitySSL
LoginThe login of an SMTP token for your domain
PasswordThat token's password
Email (from)noreply@your-domain.com — on your verified domain
Subject and template Your text, with {{order_number}}, {{amount}}, {{order_date}}, {{order_details}} and the order form's own fields

The customer gets the email after a successful payment, or when the order uses the Cash payment option. Save, then use the test email link under the save button — the test goes to the address your Tilda account is registered with.

Members Area emails

The Members Area emails users when they sign up or are added by hand, are added to a group, reset or change their password, or change their email address — and, if one-time code login is on, sends the code at every sign-in. Those are emails where a delay locks someone out.

Open Members Area Settings → Advanced → Mail server settings and set the email delivery service to your mail server. The fields are the same as for orders: host smtp.postwing.app, port 465, SSL, the token's login and password, and a sender address on your verified domain.

⚠
The server set under Payment Systems is not used by the Members Area, and the other way round. Fill in both if you use both.

Tilda CRM, used to email a lead directly from their card, has its own email-sending settings on the CRM board; choose SMTP there and enter the same values.

Forms: why SMTP is not an option, and what to do

Form submissions reach your inbox through the Email data receiver under Site Settings → Forms. Tilda sends those messages from its own servers: there is no SMTP field and no way to make them come from your domain. For notifying the site owner that is usually fine.

If a submission should come from your domain, land in a shared inbox with a proper Reply-To, or trigger a reply to the visitor, connect a webhook to the form (Site Settings → Forms → Webhook) and send the email from your own script. How Tilda calls it:

  • the form is POSTed like a regular HTML form, with the service fields tranid (the lead ID) and formid added;
  • connecting the webhook sends a test=test request first;
  • the script must answer 200 within five seconds, or Tilda retries twice, a minute apart;
  • you can attach an API key — you pick its name and value, and whether it travels in the POST data or a header.

The script below sends the submission through the REST API: one HTTP request, no library, comfortably inside five seconds. Name, Email and Phone are the form fields' variable names — adjust them if you renamed yours. Name the webhook's API key secret and send it in the POST data.

tilda-webhook.php
<?php
// tilda-webhook.php — receives a Tilda form submission and sends it via the API
const TOKEN_LOGIN = 'token-login@your-domain.com';
const TOKEN_PASS  = 'your-token-password';
const WEBHOOK_KEY = 'a-long-random-string'; // the API key set on the webhook

$data = $_POST;

// Tilda's verification request when the webhook is connected
if (($data['test'] ?? '') === 'test') {
    exit('ok');
}

if (($data['secret'] ?? '') !== WEBHOOK_KEY) {
    http_response_code(403);
    exit;
}

$name  = trim($data['Name'] ?? '');
$phone = trim($data['Phone'] ?? '');
$email = filter_var($data['Email'] ?? '', FILTER_VALIDATE_EMAIL);

$body = '<p><b>Name:</b> ' . htmlspecialchars($name) . '</p>'
      . '<p><b>Phone:</b> ' . htmlspecialchars($phone) . '</p>'
      . '<p><b>Email:</b> ' . htmlspecialchars((string) $email) . '</p>';

$payload = [
    'to'      => ['sales@your-domain.com'],
    'subject' => 'New enquiry from the website',
    'body'    => $body,
    'sender'  => 'Website <noreply@your-domain.com>',
    'auth'    => ['username' => TOKEN_LOGIN, 'password' => TOKEN_PASS],
];
if ($email) {
    $payload['reply_to'] = $email; // "Reply" goes to the visitor
}
if (!empty($data['tranid'])) {
    $payload['idempotency_key'] = 'tilda-' . $data['tranid']; // a retry is not a duplicate
}

$ch = curl_init('https://api.postwing.app/external/send_email_simple/');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode($payload),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 4, // Tilda waits five seconds at most
]);
curl_exec($ch);
curl_close($ch);

echo 'ok';
ℹ
If a response is slow, Tilda sends the request again. The lead's tranid goes in as the idempotency_key, so a retry returns the message already created instead of sending a second one.

Send a test email

For orders and the Members Area, send the test email from the settings. For forms, submit one on the published page. Every message shows up in your Postwing sending log with its delivery status.

Troubleshooting

SymptomCause and fix
Test email fails to send Port and security type do not match. Use 465 with SSL.
Authentication errorWrong token login or password.
Customer got no order email The payment did not complete. Notifications go out only after a successful payment or with the Cash option.
Members Area emails still come from Tilda SMTP was set only under Payment Systems. Switch the Members Area's delivery service too.
Webhook will not connect The script did not answer 200 to test=test: the URL is not reachable from outside, or PHP failed with an error.
Mail goes to spam The sender address is not on your verified domain.

Frequently asked questions

Can Tilda forms send submissions through my own SMTP server?

No. Form notifications are sent by Tilda itself, and the Email data receiver has no fields for a mail server. Tilda uses a custom SMTP server only for customer order notifications, Members Area emails and emails sent to leads from Tilda CRM. If submissions must come from your domain, connect a webhook to the form and send the email from your own script over SMTP or the API.

Where are Tilda's SMTP settings?

For order notifications: Site Settings → Payment Systems → General payment settings, with the mail server option chosen instead of SendGrid. For the Members Area: Members Area Settings → Advanced → Mail server settings. The two are configured separately — setting one up does not change the other.

Which port and security type should I use in Tilda?

Port 465 with SSL. Every example in Tilda's own help uses that pair, and with implicit TLS there is no separate encryption mode to get wrong.

Can the sender be a Gmail or Yahoo address?

No — Tilda's help warns that notifications from free mailbox addresses do not work reliably, and for a good reason: the DKIM key and SPF record are published on your domain and say nothing about someone else's, so DMARC fails. Use an address such as noreply@ on your verified domain.

Why did a customer not receive the order email?

Tilda sends the notification only after a successful payment, or when the order uses the Cash payment option. An abandoned payment produces no email at all. If the payment went through and the message is not in your sending log, Tilda could not connect — send a test email from the settings and check the login, password and port.

How do I send an auto-reply to someone who filled in a Tilda form?

Tilda forms only notify the site owner, so the auto-reply has to come from your webhook script, using the Email field as the recipient. Keep the reply's text fixed and leave out anything the visitor typed; otherwise the form becomes a way to send arbitrary email from your domain to any address.

Next steps