Email notifications

This document describes email notifications in WCKD Forms: staff notification mail, visitor auto-replies, and routing rules that choose which inbox receives staff mail. Webhooks and CRM integrations are documented separately in Webhooks.

How email fits in the pipeline

  1. The lead is saved to your database first.
  2. Then WCKD Forms sends the staff notification (who gets it depends on routing below).
  3. Then the visitor auto-reply runs, if you turned it on for that form.
  4. Then outbound webhooks fire for submission_created, if configured. See Webhooks.

If email fails, the lead is still in Inbox. Check your server log for [wckd-forms intake].

Who gets the staff notification?

Only the “To” address on the internal new-lead email is affected. Saving the lead, thank-you page, and inbox row are the same either way.

Priority (staff “To” only): valid directory tokendepartment dropdown → per-form Reply-To (when default routing is off) → Operations Reply-To (smtp_to) → Operations From (smtp_email).

Department routingDirectory routing
Who picks the inboxThe visitor (dropdown)Your PHP on each page (signed token)
Where to configureSettings → Forms → Configure → form builder → Department field → Choices as staff@email|Label per lineSettings → Forms → Configure → AdvancedUse multi-email forward
Best forA few teams (Sales, Support, Billing)Many pages with different staff (directories, agent profiles)
Email visible on the page?No — visitors see labels only; stored value is the staff emailNo — only a hidden token
Embed codewckd_form('registry_key', 'Placement label');wckd_form('registry_key', 'Placement label', $token); plus wckd_form_init('multi-email'); in <head>. See Embed forms.

Department routing — setup

  1. Open Settings → FormsConfigure on the template.
  2. Add or edit a Department field (or wf_department).
  3. In Choices, add one line per inbox: staff@example.com|Sales (email first, then label).
  4. Save the form. Submit a test and pick each option — confirm the right person gets mail.

Directory routing — setup

  1. On the template: Configure → Advanced → enable Use multi-email forwardSave Form.
  2. On each listing page, set the staff email in PHP and mint a token (see Embed forms).
  3. Pass the token as the third argument to wckd_form().
  4. Submit a test from that page — confirm that inbox receives the staff notification.

Site-wide mail defaults

Settings → Operations holds default subject lines and signature text. Individual forms can override these under Settings → Forms.

  1. Open Settings → Operations.
  2. Fill in default subject, signature, From, Reply-To, and SMTP if needed.
  3. Save.

Per-form mail settings

Open Settings → Forms → choose a template → Configure.

  • Thank-you and not-sent URLs
  • Subject, Reply-To, CC, BCC
  • Auto-reply subject and body (and whether to include a copy of the submission)
  • Optional custom SMTP for this template only
  • Department routing (form builder) and directory routing (Advanced)

SMTP or PHP mail()

  • SMTP — fill in both host and username (and password) to use PHPMailer.
  • PHP mail() — leave SMTP host and username empty; you still need a valid From address.
  • Do not half-fill SMTP — the settings form will reject it.

Step-by-step for providers: SMTP setup.

Common mistakes

  • No staff email arrived — check SMTP, Reply-To, and routing. The lead is still in the inbox.
  • Wrong person got mail — check department choices or directory token on that page.
  • Looking for Zapier or HubSpot — that is Webhooks, not Notifications.

Related pages