Notifications (staff email and auto-reply)

This guide is for a Manager or Primary Owner who configures email: staff notifications when a lead is saved, visitor auto-replies, and who receives the internal “To” address. HTTPS webhooks (Zapier, Make, CRM automation) are a separate feature — see Webhooks.

SMTP transport and provider setup: SMTP setup. Mapping webhook JSON to CRMs: CRM & tools.

Staff notification “To”: department routing vs directory routing

These are two different ways to choose which staff inbox receives the internal new-lead email. You can use neither, one, or both; if both apply, directory routing wins when the token is valid, then department routing, then the normal Reply-To / team inbox from Operations.

FeatureDepartment routingDirectory routing
Where you set it upSettings → FormsConfigure → form builder: add the Department field and set Choices to staff@email|Label lines (one staff inbox per line).Settings → Forms → same template → ConfigureAdvanced settingsUse multi-email forward (per-template on/off, token lifetime, optional allowed domains). The signing secret lives in wf_config/private.php and is ensured when you save a form with this option enabled.
Who chooses the mailboxThe visitor’s submitted value for one field you pick (usually a select dropdown such as Department).Your server-side PHP on that page (e.g. listing template) picks the staff email, then mints an opaque token. The browser never sees the email address.
Best forA small fixed list of teams (Sales, Support, Billing) where showing a dropdown is fine.Many different staff addresses (member directories, franchise listings) where you must not put raw emails in the HTML.
Embed codeNormal wckd_form('registry_key', 'Placement label'); — no extra arguments.Same form key, but pass a third argument: wckd_form('registry_key', 'Placement label', $token);. In <head>, call wckd_form_init('multi-email') once so wf_load_app_config(), wf_get_form_config(), and wf_directory_routing_mint_recipient_token() are available. Load this template’s settings from wf_get_form_config('registry_key')['settings'] (array), then mint with wf_directory_routing_mint_recipient_token($email, wf_load_app_config() ?? [], $formSettings). See Embed forms.

Department routing — checklist

  1. Open Settings → FormsConfigure on the template.
  2. In the form builder, add a Department field (or keep the built-in wf_department row) and open Choices.
  3. Enter one line per inbox: staff@example.com|Sales (email first; the visitor’s selection stores that email and staff mail goes there).
  4. If no department field is present or no valid email lines exist, staff mail follows Reply-To and Operations defaults.
  5. Save the form and submit a test for each choice; confirm the correct address receives the staff notification.

Directory routing — checklist

  1. Open Settings → Forms → the template you embed on directory-style pages → Configure → under Advanced settings, check Use multi-email forward, set token lifetime and optional allowed domains if needed, then Save Form (a signing secret is written to wf_config/private.php when missing).
  2. In the PHP template for each page that needs a unique staff inbox, load merged app config, load that template’s $formSettings from wf_get_form_config(), mint a token for that page’s email, and pass it as the third argument to wckd_form() (see table above). If the token is empty (feature off for that template, invalid email, or domain not allowed), the form still works; staff mail uses department routing or Reply-To instead.
  3. Submit once and confirm the expected inbox receives the notification.

After browser checks in wckd-forms/submit.php, intake validates the payload and inserts the submission row first. Only then does the app send mail.

  1. ValidateMySQL INSERT (lead is in the dashboard even if mail fails).
  2. Staff notification email to the resolved “To” address (see routing above).
  3. Visitor auto-reply when enabled for that form.
  4. HTTPS webhooks run after mail attempts — configured separately; see Webhooks.

Important. A failed SMTP send does not remove the row. Check PHP error logs for [wckd-forms intake] mail lines.

Operations supplies the baseline subject and signature when a form omits its own copy.

  1. Open Settings → Operations.
  2. Fill default subject and signature fields, then save.
  3. Send a test submission from a form that inherits those defaults and confirm the notification content.

Settings → Forms stores per-template routing, subjects, auto-reply, department routing, and optional SMTP overrides.

For department routing, read the checklist in Who gets the staff notification? above. It is configured only on this tab, not under Operations.

  1. Open Settings → Forms and select a registry key.
  2. Set thank-you and not-sent URLs, subject, reply-to, CC, BCC, and routing toggles.
  3. Configure department routing in the form builder: on the Department field, set Choices to staff@email|Label lines (see checklist above).
  4. Configure auto-reply to the visitor (subject, body, optional submission copy).
  5. Fill custom SMTP only when this template must leave through different credentials than the site default.
  6. Save the form.

Screenshot. Show the mail block on Settings → Forms for one template.

The transport must be internally consistent or validation fails.

  1. When SMTP host and username are both non-empty, PHPMailer uses SMTP with the provided port and password.
  2. When both are empty, the app uses PHP mail() and requires a valid From address for your host.
  3. Never leave half-filled SMTP (host only, user blank, or the reverse). The installer and settings forms reject that combination.
  4. Provider-specific steps: SMTP setup.
  • No staff mail: invalid Reply-To, SMTP misconfiguration, or empty “To” after routing — row still in inbox.
  • Wrong inbox: directory token missing on a directory page, or department choice not mapped — see routing table.
  • Confusing webhooks with email: CRM URLs belong under Webhooks, not SMTP settings.
  • Webhooks: HTTPS POSTs on new submissions or status changes (not email).
  • Operations: shared mail defaults and abuse controls.
  • SMTP setup: Mailgun, Postmark, SES, and PHP mail().
  • Embed forms: optional third argument for directory routing.
  • CRM & tools: map webhook JSON into external systems.
  • Inbox & leads: where status changes originate.