Guides

Add Mailiy to your website

You need your form's key from the dashboard and an HTML form. Ready-made forms are in the templates.

Guide for your platform

Privacy

What a form needs under the GDPR is in the checklist for a GDPR compliant contact form.

Any other website

A form with its action pointing to Mailiy and method POST is enough. Add the script as well and it sends every such form in the background and writes the answer below it. If your page's lang attribute says German, the answer is in German, otherwise in English.

<form action="https://mailiy.com/api/submit" method="POST"
      data-success="Thanks! We'll get back to you.">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  …
  <p data-mailiy-result></p>
</form>
<script src="https://mailiy.com/client/script.js" defer></script>

While sending, the form has aria-busy and the button is disabled. Afterwards data-state is success or error, and the script fires an event:

document.addEventListener("mailiy:success", (event) => {
  // event.target is the form, event.detail the answer from Mailiy
});

Open the dashboard