The SMTP connector sends form submissions as plain-text emails using raw TCP sockets via cloudflare:sockets. It supports STARTTLS and AUTH LOGIN authentication.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
host |
string |
Yes | — | SMTP server hostname |
port |
number |
Yes | — | SMTP server port (1 - 65535) |
secureTransport |
string |
No | "starttls" |
TLS mode: off, starttls, or on |
username |
string |
Yes | — | SMTP auth username |
password |
string |
Yes | — | SMTP auth password |
from |
string |
Yes | — | Sender email address |
to |
string[] |
Yes | — | One or more recipient email addresses |
subjectTemplate |
string |
No | "New submission: {{formName}}" |
Subject line template |
| Mode | Behavior |
|---|---|
starttls |
Connect in plaintext, upgrade to TLS after STARTTLS command (port 587) |
on |
Connect with TLS immediately (port 465) |
off |
No TLS — plaintext only (not recommended) |
The connector uses AUTH LOGIN (Base64-encoded username and password). This is the most widely supported SMTP auth mechanism. The SMTP conversation follows this sequence:
EHLO formdata.devSTARTTLS (if secureTransport is starttls)EHLO formdata.dev againAUTH LOGIN with Base64 credentialsMAIL FROM / RCPT TO / DATAQUITThe subjectTemplate field supports two variables:
| Variable | Replaced With | Example Output |
|---|---|---|
{{formName}} |
The form's display name | New submission: Contact Form |
{{submissionId}} |
The submission UUID | Submission a1b2c3d4-... |
Default template: New submission: {{formName}}
Custom example: [{{formName}}] Submission {{submissionId}}
The email is sent as text/plain; charset=UTF-8 with this structure:
Gmail requires an App Password when using SMTP with 2FA enabled. Regular account passwords will not work.
Replace us-east-1 with your SES region. Use the SMTP endpoint from the SES console.
| Port | TLS Mode | Typical Use |
|---|---|---|
| 587 | starttls |
Submission (recommended) |
| 465 | on |
Implicit TLS |
| 25 | off |
Relay (usually blocked by providers) |