BETA
Skip to content

Email Notifications

Get notified by email whenever a new form submission arrives. Notifications are sent asynchronously via a background job and include all submission data in a formatted table.

Configuration

Enable email notifications in the form settings. You can configure them via the dashboard or the API.

Using the Dashboard

  1. Open your form in the Krafter dashboard.
  2. Go to the Settings tab.
  3. Enable Email Notifications.
  4. Enter one or more recipient email addresses (comma-separated).
  5. Save.

Using the API

Set the notifications object when creating or updating a form:

bash
curl -X POST https://app.krafter.dev/api/v1/forms \
  -H "Authorization: Bearer kr_live_abc123def456" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Contact Form",
    "slug": "contact",
    "notifications": {
      "email_enabled": true,
      "email_to": "team@yourcompany.com,support@yourcompany.com"
    }
  }'

Or update an existing form:

bash
curl -X PATCH https://app.krafter.dev/api/v1/forms/FORM_ID \
  -H "Authorization: Bearer kr_live_abc123def456" \
  -H "Content-Type: application/json" \
  -d '{
    "notifications": {
      "email_enabled": true,
      "email_to": "team@yourcompany.com"
    }
  }'

Notification Settings

FieldTypeDescription
email_enabledbooleanWhether email notifications are active
email_tostringComma-separated list of recipient email addresses

Notification Email Format

Each notification email includes:

  • Subject: "New submission: {form name}" (or a custom subject if _subject is provided)
  • From: forms@krafter.dev
  • Body: A formatted table with all submitted field names and values
  • Reply-To: The submitter's email (if _replyto is configured)

Customizing Notifications with Special Fields

You can customize notification behavior per submission using special form fields. These fields are not stored as submission data.

Custom Subject (_subject)

Override the default email subject line:

html
<input type="hidden" name="_subject" value="Urgent: New support request">

The notification email will use "Urgent: New support request" instead of the default "New submission: {form name}".

Reply-To Address (_replyto)

Set the reply-to address so you can reply directly to the person who submitted the form. The value should be the name of the form field that contains the email address:

html
<input type="email" name="email" required>
<input type="hidden" name="_replyto" value="email">

When the user submits the form with email=jane@example.com, the notification email's reply-to header will be set to jane@example.com.

TIP

This makes it easy to reply directly to form submissions from your email client. Just hit "Reply" and you are responding to the person who filled out the form.

CC Recipients (_cc)

Add extra CC recipients for a specific submission, in addition to the configured email_to addresses:

html
<input type="hidden" name="_cc" value="manager@company.com,cto@company.com">

Delivery Details

  • Sending method: Notifications are sent asynchronously via an Oban background job in the mail queue.
  • From address: forms@krafter.dev
  • Delivery: Via Amazon SES
  • Spam submissions: Notifications are not sent for submissions flagged as spam by honeypot detection.

INFO

Notifications are processed in the background. There may be a few seconds of delay between the submission and the notification email arriving.

Example: Complete Form with Notifications

html
<form action="https://app.krafter.dev/f/contact" method="POST">
  <!-- Spam protection -->
  <div style="position: absolute; left: -9999px;">
    <input type="text" name="_honeypot" tabindex="-1" autocomplete="off">
  </div>

  <!-- Notification customization -->
  <input type="hidden" name="_subject" value="New contact from website">
  <input type="hidden" name="_replyto" value="email">
  <input type="hidden" name="_redirect" value="https://yoursite.com/thank-you">

  <!-- Visible fields -->
  <label for="name">Name</label>
  <input type="text" id="name" name="name" required>

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

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

  <button type="submit">Send</button>
</form>

With this setup:

  • Spam is detected via the honeypot field.
  • The notification subject will be "New contact from website".
  • Replies go directly to the person who submitted the form.
  • The user is redirected to your thank-you page after submitting.

Built by Krafter Studio