Skip to content

Send Email

The Send Email node sends an email using WordPress wp_mail(). It is a pass-through node -- the input data flows to the output unchanged after the email is sent.

Configuration

PropertyTypeDefaultDescription
tostring--Required. Recipient email address. Supports { { }} expressions.
subjectstring--Required. Email subject line. Supports { { }} expressions.
bodystring--Email body text. Supports { { }} expressions.

Input

Accepts any data type. The input data is available in expressions as row (for associative arrays) or input.

Output

Returns the input data unchanged. The email is a side effect.

Expression Context

VariableDescription
rowThe input data (first row if array of rows).
inputThe full input data.

Security

  • The to address is validated with is_email() and sanitized with sanitize_email().
  • The subject is sanitized with sanitize_text_field().
  • The body is sent as-is (plain text by default).

Example Use Cases

Contact form notification

to: "admin@example.com"
subject: "New contact from `{ {row.name}}`"
body: "Name: `{ {row.name}}`\nEmail: `{ {row.email}}`\nMessage:\n`{ {row.message}}`"

Order confirmation

to: "`{ {row.email}}`"
subject: "Order #`{ {row.order_id}}` Confirmed"
body: "Hi `{ {row.name}}`,\n\nYour order #`{ {row.order_id}}` has been confirmed.\nTotal: $`{ {number_format(row.total, 2)}}`\n\nThank you!"

Admin alert on high-value orders

to: "finance@example.com"
subject: "High-value order: $`{ {number_format(row.total, 2)}}`"
body: "Order #`{ {row.id}}` from `{ {row.customer_name}}` for $`{ {number_format(row.total, 2)}}`."

Typical pipeline placement

Context --> Validate --> Sanitize --> Save Row --> Send Email --> Output

The email is sent after the data is saved, ensuring the submission was successful before notifying.

WARNING

Send Email is a write node -- it is never cached and sends a real email on every execution. Always protect email-sending pipelines with Rate Limit and Validate to prevent abuse.

TIP

wp_mail() uses whatever email transport WordPress is configured with (default PHP mail(), or an SMTP plugin). For reliable delivery, use an SMTP plugin like WP Mail SMTP.