Getting started¶
letterpost receives the submissions of your HTML forms, filters spam and forwards each submission to your inbox. Your site needs no server code and no JavaScript.
1. Create a form¶
Sign in at app.letterpost.eu and create a form. Give it a name you will recognise in your inbox, for example "Contact form".
letterpost gives the form an endpoint like this one:
https://api.letterpost.eu/f/k3v9q2
The last part is the form's ID. You find the endpoint, ready to copy, on the form's page in the dashboard.
2. Point your form at the endpoint¶
Set the endpoint as the action of your form and send it with POST. Keep
your own markup and styles.
<form action="https://api.letterpost.eu/f/k3v9q2" method="POST">
<label>Email <input type="email" name="email" required></label>
<label>Message <textarea name="message" required></textarea></label>
<button type="submit">Send</button>
</form>
Every form needs an email field
Each submission must contain exactly one field named email with a valid
address. letterpost uses it as the Reply-To of the mail it sends you, so
you can answer with one click. Submissions without it are rejected. See
Form fields.
3. Send a test submission¶
Open your page, fill in the form and send it. The submission shows up on the form's page in the dashboard, and letterpost mails it to your forwarding address.
After sending, the browser lands on letterpost's thank-you page. To send people to a page of your own instead, set a redirect URL in the form's settings under Delivery.
Next steps¶
- Form fields: the fields letterpost treats specially.
- Spam protection: honeypot, allowed websites and captchas.
- Errors and redirects: what happens when a submission is rejected.
- JSON submissions: sending a form with
fetch.