shadcn.io is not affiliated with official shadcn/ui
SMTP Settings Block for React
An outgoing mail settings panel that leads with how mail will leave, a server form with presets, an encryption choice and a masked password, beside a dark terminal that plays a simulated SMTP session or stops at the mismatch a real server would give.
Installation
Overview
Set the server a product sends its mail through and see what that means before saving, with this SMTP settings panel for React with Base UI. A hairline frame with a plus mark on each corner leads with a sentence worked out from the fields ("sends as crm@sedgefield.test through smtp.mailhost.example:587, upgraded to TLS with STARTTLS") and says whether the last test passed, failed or is out of date, or that the password and the mail cross the network in clear text when there is no encryption. A Native Select of presets (submission on 587, implicit TLS on 465, a local relay on 25) fills the host, the port and the encryption together; the encryption is a choice of three, and a Password Input holds the secret masked. Beside them a terminal, dark whatever the theme, plays a simulated SMTP session for what is typed (greeting, EHLO, STARTTLS, AUTH, the sender accepted) or stops at the mismatch a real server gives, such as SSL on port 587 where the server expects STARTTLS. An action foot counts unsaved changes beside a Shine Button that saves them in the page. It's built from Native Select, Input, Password Input, Field, Button, Shine Button and Guides, with a CSS entrance only. For a CRM, a helpdesk or any self-hosted product that needs its own outgoing mail.
FAQ
How do I change the presets and the starting settings?
Edit PRESETS at the top (each has a host, a port and an encryption) and SAVED, which holds what the account has stored when the page opens. KNOWN_PORTS lists the ports the sample server answers on, and CLIENT is the name the client gives in EHLO. The lead sentence, the transcript and the unsaved count are worked out from the fields. The password in SAVED is a plain placeholder, shown masked and revealed only by the eye button.
What does Run test do, and does it connect anywhere?
It never connects. The transcript is a pure function of the fields: a port the sample server doesn't answer on is refused, TLS on a port that expects STARTTLS (587), plain text or STARTTLS on a port that expects TLS from the first byte (465) and TLS on port 25 each stop with the message a real server gives, no encryption on 587 is told to issue STARTTLS first, a missing username or password gets an authentication required answer, and anything else plays out to a sender accepted. The password never appears: AUTH shows four stars. Changing a field marks the result as out of date.
Why is the terminal dark in a light theme?
A terminal is dark by nature, so it keeps the dark scope and everything around it follows the theme. Its text sits on the dark surface at full contrast, the lines read as client, server or note with a sign and, for assistive technology, a spoken word, and the region scrolls and takes focus so a long transcript can be read by keyboard.
What stays local, and how do I make it real?
Everything. Nothing is saved, tested or sent: Save keeps the settings in this page's state, and the passed or failed test is the simulation above. To make it real, post the settings to your server, store the password encrypted, run the test from your server (a browser can't open an SMTP connection) and stream its real transcript, with the password redacted, into the same pane.
How does it look on a phone, and is it accessible?
The form comes first and the test pane under it, with the transcript wrapping and scrolling inside its own region. Each field has a visible label and a reserved line for its problem, which is set only after Save or Run test and is read with the field; the encryption choice is a group of native radio buttons; the status line is a polite live region that also reads the test's verdict. The preset select and the fields keep the layout from moving as the lead sentence changes length.
Related
- Pro
Email Domain Settings
Domains and deliveryA sending domain settings panel that leads with what SPF, DKIM and DMARC amount to for your mail, shows the three records as cells with status, host and value to copy, and a DMARC policy select that rewrites its record.
- Pro
Email Templates Settings
NotificationsAn email templates window of three panes: the templates with an on switch each, an editor with subject, message and variable chips that insert at the caret, and a drawn email filled from a sample person you pick.
- Pro
Notification Channels Settings
Alerts and auditA destinations window for alerts: a rail of Slack, email, PagerDuty, webhook and SMS destinations with a status word, beside the chosen one's routing by severity, a pause switch and a simulated test.
- Pro
A build settings panel for a static-site host: a preset fills the folder and commands, and a dark terminal writes the build log from the fields, or stops at the error a real runner would give.
- Pro
Developer Tools Settings
API and webhooksFour SDK switches and an environment choice beside a request panel they steer: capture lists six requests, choosing one opens its JSON, and debug, verbose errors and timing each add their own part to what it shows.
- Pro
Cache Policy Settings
Domains and deliveryAn ordered table of cache rules where first match wins: each path pattern has a freshness bar, how long a copy stays fresh and how long a stale one may be served, a count of the cached paths it really claims, and a purge that counts what it would clear.