Templates

Forms to copy

Every template is plain HTML and works without JavaScript too. Replace YOUR_ACCESS_KEY with your form's key from the dashboard. The script at the end is optional: with it the page stays put and the answer shows below the form. How to use the templates in WordPress, Webflow or Framer is in the guides.

Contact form

Name, email and message. Fits almost any website.

Because the field is called email, hitting reply in your mail app answers the sender directly. A hidden from_name field puts your website's name instead of “Mailiy” as the sender of the notification.

<form action="https://mailiy.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="hidden" name="subject" value="New contact request" />
  <label>Name
    <input type="text" name="name" required autocomplete="name" />
  </label>
  <label>Email
    <input type="email" name="email" required autocomplete="email" />
  </label>
  <label>Message
    <textarea name="message" rows="5" required></textarea>
  </label>
  <input type="checkbox" name="botcheck" style="display: none" tabindex="-1" autocomplete="off" />
  <button type="submit">Send</button>
</form>
<script src="https://mailiy.com/client/script.js" defer></script>

Newsletter signup

Just an address and consent. Turn on “Require consent” in the dashboard and Mailiy stores it with the submission.

Mailiy doesn't send newsletters. The template collects signups that you export to CSV or pass to your newsletter tool by webhook. Without the tick, Mailiy then rejects the submission.

<form action="https://mailiy.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="hidden" name="subject" value="New newsletter signup" />
  <label>Email
    <input type="email" name="email" required autocomplete="email" />
  </label>
  <label>
    <input type="checkbox" name="consent" value="yes" required />
    I want to receive the newsletter.
  </label>
  <input type="checkbox" name="botcheck" style="display: none" tabindex="-1" autocomplete="off" />
  <button type="submit">Send</button>
</form>
<script src="https://mailiy.com/client/script.js" defer></script>

Appointment request

Preferred day, time of day and a field for the reason.

This is a request, not a booking: Mailiy checks no calendar. With an autoresponder, the person immediately gets a confirmation that the request arrived and that you'll get back to them.

<form action="https://mailiy.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="hidden" name="subject" value="New appointment request" />
  <label>Name
    <input type="text" name="name" required autocomplete="name" />
  </label>
  <label>Email
    <input type="email" name="email" required autocomplete="email" />
  </label>
  <label>Phone
    <input type="tel" name="phone" autocomplete="tel" />
  </label>
  <label>Preferred date
    <input type="date" name="date" required />
  </label>
  <label>Time
    <select name="time">
      <option>Morning</option>
      <option>Afternoon</option>
    </select>
  </label>
  <label>What is it about?
    <textarea name="message" rows="5" required></textarea>
  </label>
  <input type="checkbox" name="botcheck" style="display: none" tabindex="-1" autocomplete="off" />
  <button type="submit">Send</button>
</form>
<script src="https://mailiy.com/client/script.js" defer></script>

Job application

With file upload. Up to 5 files with 10 MB in total per submission.

Without enctype="multipart/form-data" only the file name arrives. Mailiy scans every file for viruses and links it in the notification. Application data is sensitive, so set a short retention period, such as 90 days.

<form action="https://mailiy.com/api/submit" method="POST" enctype="multipart/form-data">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="hidden" name="subject" value="New application" />
  <label>Name
    <input type="text" name="name" required autocomplete="name" />
  </label>
  <label>Email
    <input type="email" name="email" required autocomplete="email" />
  </label>
  <label>Position
    <input type="text" name="position" required />
  </label>
  <label>CV (PDF)
    <input type="file" name="cv" accept=".pdf" required />
  </label>
  <label>Cover letter
    <textarea name="message" rows="5" required></textarea>
  </label>
  <input type="checkbox" name="botcheck" style="display: none" tabindex="-1" autocomplete="off" />
  <button type="submit">Send</button>
</form>
<script src="https://mailiy.com/client/script.js" defer></script>

Feedback

A rating from 1 to 5 and a comment. The email is optional.

Anyone staying anonymous sends no address, so no autoresponder goes out either. In the dashboard you search the submissions and export the ratings to CSV for analysis.

<form action="https://mailiy.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="hidden" name="subject" value="New feedback" />
  <fieldset>
    <legend>How happy are you?</legend>
    <label><input type="radio" name="rating" value="1" required /> 1</label>
    <label><input type="radio" name="rating" value="2" required /> 2</label>
    <label><input type="radio" name="rating" value="3" required /> 3</label>
    <label><input type="radio" name="rating" value="4" required /> 4</label>
    <label><input type="radio" name="rating" value="5" required /> 5</label>
  </fieldset>
  <label>What can we do better?
    <textarea name="message" rows="5" required></textarea>
  </label>
  <label>Email (optional)
    <input type="email" name="email" />
  </label>
  <input type="checkbox" name="botcheck" style="display: none" tabindex="-1" autocomplete="off" />
  <button type="submit">Send</button>
</form>
<script src="https://mailiy.com/client/script.js" defer></script>

Adapting the templates

You can rename, remove or add fields, up to 50 per form. Only the name attribute matters: it becomes the label in the email and the column in the CSV export. Browsers don't send fields without a name.

A few field names have a fixed meaning. subject sets the subject line, redirect sends the person to your own thank-you page after submitting, and ccemail and bccemail copy in further confirmed recipients. The hidden botcheck field is a trap for bots: if it is filled in, Mailiy discards the submission. Leave it in.

The templates ship no CSS and take on your site's styles. Every field sits inside a label, so screen readers announce it and clicking the label focuses the field. Keep that when you rework the markup. The full list of fields is in the docs.