Reply-To address

Answer form submissions by hitting Reply: the visitor email becomes the Reply-To address, or set your own with replyto.

Submission emails come from a SilentForms address, but you never have to copy the visitor's address out of the message to answer them. When the form has an email field, that address becomes the email's Reply-To, so pressing Reply in any mail app writes straight to the visitor.

The email field does it automatically#

Name the visitor's address field email:

<form action="https://silentforms.com/api/submit" method="POST">
  <input type="hidden" name="accessKey" value="YOUR_ACCESS_KEY_HERE">

  <label for="name">Name</label>
  <input id="name" type="text" name="name" required>

  <label for="email">Your email</label>
  <input id="email" type="email" name="email" required>

  <label for="message">Message</label>
  <textarea id="message" name="message" required></textarea>

  <input type="checkbox" name="botcheck" style="display: none;" tabindex="-1" autocomplete="off">
  <button type="submit">Send</button>
</form>

The address is used in two places: it is listed in the submission like any other field, and it is set as the Reply-To header. The email also ends with a line saying who your reply will go to, so you can check before you hit Send.

The name must be exactly email (lower case). A field called Email, e-mail or your_email is kept as data but not used for Reply-To. Without any Reply-To, pressing Reply would address the SilentForms sending address, which does not reach the visitor.

Override it with replyto#

Sometimes replies should go somewhere other than the email field:

  • the form collects several addresses (the buyer and the recipient of a gift),
  • your field is named differently and you cannot rename it,
  • replies should go to a colleague or a shared support inbox rather than the visitor.

Add a replyto field. _replyto and replyTo work too, so Formspree-style forms keep working. It wins over email:

<input type="hidden" name="replyto" value="[email protected]">

Or copy it from another field in JavaScript before sending:

const data = Object.fromEntries(new FormData(form));
data.replyto = data.contact_email;

Unlike email, the replyto field is a special field: it sets the header and is removed from the submission data, so it does not show as a row in the email, the dashboard or webhooks.

Validation#

Both fields are checked before anything is sent:

  • an email value that is not an address is refused with 400 "Email address is invalid.",
  • a replyto value that is not an address is refused with 400 "Reply-to address is invalid.".

An empty email field is allowed and simply means no Reply-To. Use type="email" and required on the input so the browser catches typos before the request is made; it shows a friendlier message than the error page.

The check is deliberately simple (something, an @, a domain with a dot). It cannot tell whether the address really exists, so a visitor who mistypes their domain still gets through. Asking for the address twice, or showing it back before submitting, are the usual fixes. See Client-side validation.

One address only#

Reply-To takes a single address. A value with several addresses, such as [email protected], [email protected], does not pass validation and the submission is refused. If you need replies to reach more than one person, set replyto to a shared mailbox or a group address that forwards to everyone, or add the others in CC when you reply.

To send every submission to more people, add them as extra recipients: each gets their own copy once they confirm.

Replying from a webhook#

The Reply-To header only exists on the email. Webhooks receive the email field as part of the JSON payload, so an automation can still answer the visitor. Note that replyto is not in the payload, because special fields are removed.

Next steps#