Greyd Forms Mail Filters

If you’re looking for more filters related to Greyd Forms, see the Greyd Forms Filters documentation.

Opt-in mail filters

greyd_forms_optin_mail_to

Filter to modify the recipient email address for the opt-in verification mail.

This filter allows developers to customize the email address that receives the verification email, enabling dynamic recipient selection based on form data or other conditions.

Parameters:

  • string $mail_to – Email address to send the verification mail to.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for verification.

Returns: string – Modified email address for the verification mail.

PHP
/**
 * Filter to modify the recipient email address for the opt-in verification mail.
 * 
 * This filter allows developers to customize the email address that receives
 * the verification email, enabling dynamic recipient selection based on form
 * data or other conditions.
 * 
 * @filter greyd_forms_optin_mail_to
 * 
 * @param string $mail_to Email address to send the verification mail to.
 * @param int    $post_id WP_Post ID of the form.
 * @param array  $data    Validated form data.
 * @param string $token   Entry token for verification.
 * 
 * @return string $mail_to Modified email address for the verification mail.
 */
$mail_to = apply_filters( 'greyd_forms_optin_mail_to', $mail_to, $post_id, $data, $token );

greyd_forms_optin_mail_content

Filter to modify the content of the opt-in verification email.

This filter allows developers to customize the HTML content of the verification email, enabling dynamic content generation based on form data or other conditions.

Parameters:

  • string $content – Full HTML content of the verification email.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • int $entry_id – WP_Post ID of the entry.

Returns: string – Modified HTML content for the verification email.

PHP
/**
 * Filter to modify the content of the opt-in verification email.
 * 
 * This filter allows developers to customize the HTML content of the
 * verification email, enabling dynamic content generation based on form
 * data or other conditions.
 * 
 * @filter greyd_forms_optin_mail_content
 * 
 * @param string $content  Full HTML content of the verification email.
 * @param int    $post_id  WP_Post ID of the form.
 * @param array  $data     Validated form data.
 * @param int    $entry_id WP_Post ID of the entry.
 * 
 * @return string $content Modified HTML content for the verification email.
 */
$content = apply_filters( 'greyd_forms_optin_mail_content', $content, $post_id, $data, $entry_id );

greyd_forms_optin_mail_subject

Filter to modify the subject line of the opt-in verification email.

This filter allows developers to customize the email subject line, enabling dynamic subject generation based on form data or other conditions.

Parameters:

  • string $subject – Email subject line for the verification mail.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • int $entry_id – WP_Post ID of the entry.

Returns: string – Modified subject line for the verification email.

PHP
/**
 * Filter to modify the subject line of the opt-in verification email.
 * 
 * This filter allows developers to customize the email subject line,
 * enabling dynamic subject generation based on form data or other conditions.
 * 
 * @filter greyd_forms_optin_mail_subject
 * 
 * @param string $subject  Email subject line for the verification mail.
 * @param int    $post_id  WP_Post ID of the form.
 * @param array  $data     Validated form data.
 * @param int    $entry_id WP_Post ID of the entry.
 * 
 * @return string $subject Modified subject line for the verification email.
 */
$subject = apply_filters( 'greyd_forms_optin_mail_subject', $subject, $post_id, $data, $entry_id );

greyd_forms_optin_mail_from

Filter to modify the sender email address for the opt-in verification mail.

This filter allows developers to customize the “From” email address of the verification email, enabling dynamic sender selection.

Parameters:

  • string $mail_from – Email address to send the verification mail from.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for verification.

Returns: string – Modified sender email address for the verification mail.

PHP
/**
 * Filter to modify the sender email address for the opt-in verification mail.
 * 
 * This filter allows developers to customize the "From" email address of the
 * verification email, enabling dynamic sender selection.
 * 
 * @filter greyd_forms_optin_mail_from
 * 
 * @param string $mail_from Email address to send the verification mail from.
 * @param int    $post_id   WP_Post ID of the form.
 * @param array  $data      Validated form data.
 * @param string $token     Entry token for verification.
 * 
 * @return string $mail_from Modified sender email address for the verification mail.
 */
$mail_from = apply_filters( 'greyd_forms_optin_mail_from', $mail_from, $post_id, $data, $token );

greyd_forms_optin_mail_from_name

Filter to modify the sender name for the opt-in verification mail.

This filter allows developers to customize the “From” name of the verification email, enabling dynamic sender name selection.

Parameters:

  • string $mail_from_name – Display name to send the verification mail from.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for verification.

Returns: string – Modified sender name for the verification mail.

PHP
/**
 * Filter to modify the sender name for the opt-in verification mail.
 * 
 * This filter allows developers to customize the "From" name of the
 * verification email, enabling dynamic sender name selection.
 * 
 * @filter greyd_forms_optin_mail_from_name
 * 
 * @param string $mail_from_name Display name to send the verification mail from.
 * @param int    $post_id        WP_Post ID of the form.
 * @param array  $data           Validated form data.
 * @param string $token          Entry token for verification.
 * 
 * @return string $mail_from_name Modified sender name for the verification mail.
 */
$mail_from_name = apply_filters( 'greyd_forms_optin_mail_from_name', $mail_from_name, $post_id, $data, $token );

greyd_forms_optin_mail_headers

Filter to modify the email headers for the opt-in verification mail.

This filter allows developers to customize the email headers, enabling additional headers like Reply-To, CC, BCC, or custom headers.

Parameters:

  • array $headers – Array of email headers for the verification mail.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for verification.

Returns: array – Modified array of email headers.

PHP
/**
 * Filter to modify the email headers for the opt-in verification mail.
 * 
 * This filter allows developers to customize the email headers,
 * enabling additional headers like Reply-To, CC, BCC, or custom headers.
 * 
 * @filter greyd_forms_optin_mail_headers
 * 
 * @param array  $headers Array of email headers for the verification mail.
 * @param int    $post_id WP_Post ID of the form.
 * @param array  $data    Validated form data.
 * @param string $token   Entry token for verification.
 * 
 * @return array $headers Modified array of email headers.
 */
$headers = apply_filters( 'greyd_forms_optin_mail_headers', $headers, $post_id, $data, $token );

Registration mail filters

greyd_forms_registration_mail_to

Filter to modify the recipient email address for the registration confirmation mail.

This filter allows developers to customize the email address that receives the registration confirmation email, enabling dynamic recipient selection based on form data or other conditions.

Parameters:

  • string $mail_to – Email address to send the registration mail to.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the registration.

Returns: string – Modified email address for the registration mail.

PHP
/**
 * Filter to modify the recipient email address for the registration confirmation mail.
 * 
 * This filter allows developers to customize the email address that receives the
 * registration confirmation email, enabling dynamic recipient selection based on
 * form data or other conditions.
 * 
 * @filter greyd_forms_registration_mail_to
 * 
 * @param string $mail_to Email address to send the registration mail to.
 * @param int    $post_id WP_Post ID of the form.
 * @param array  $data    Validated form data.
 * @param string $token   Entry token for the registration.
 * 
 * @return string $mail_to Modified email address for the registration mail.
 */
$mail_to = apply_filters( 'greyd_forms_registration_mail_to', $mail_to, $post_id, $data, $token );

greyd_forms_registration_mail_content

Filter to modify the content of the registration confirmation email.

This filter allows developers to customize the HTML content of the registration confirmation email, enabling dynamic content generation based on form data or other conditions.

Parameters:

  • string $content – Full HTML content of the registration email.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the registration.

Returns: string – Modified HTML content for the registration email.

PHP
/**
 * Filter to modify the content of the registration confirmation email.
 * 
 * This filter allows developers to customize the HTML content of the
 * registration confirmation email, enabling dynamic content generation
 * based on form data or other conditions.
 * 
 * @filter greyd_forms_registration_mail_content
 * 
 * @param string $content Full HTML content of the registration email.
 * @param int    $post_id WP_Post ID of the form.
 * @param array  $data    Validated form data.
 * @param string $token   Entry token for the registration.
 * 
 * @return string $content Modified HTML content for the registration email.
 */
$content = apply_filters( 'greyd_forms_registration_mail_content', $content, $post_id, $data, $token );

greyd_forms_registration_mail_subject

Filter to modify the subject line of the registration confirmation email.

This filter allows developers to customize the email subject line, enabling dynamic subject generation based on form data or other conditions.

Parameters:

  • string $subject – Email subject line for the registration mail.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the registration.

Returns: string – Modified subject line for the registration email.

PHP
/**
 * Filter to modify the subject line of the registration confirmation email.
 * 
 * This filter allows developers to customize the email subject line,
 * enabling dynamic subject generation based on form data or other conditions.
 * 
 * @filter greyd_forms_registration_mail_subject
 * 
 * @param string $subject Email subject line for the registration mail.
 * @param int    $post_id WP_Post ID of the form.
 * @param array  $data    Validated form data.
 * @param string $token   Entry token for the registration.
 * 
 * @return string $subject Modified subject line for the registration email.
 */
$subject = apply_filters( 'greyd_forms_registration_mail_subject', $subject, $post_id, $data, $token );

greyd_forms_registration_mail_from

Filter to modify the sender email address for the registration confirmation mail.

This filter allows developers to customize the “From” email address of the registration email, enabling dynamic sender selection.

Parameters:

  • string $mail_from – Email address to send the registration mail from.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the registration.

Returns: string – Modified sender email address for the registration mail.

PHP
/**
 * Filter to modify the sender email address for the registration confirmation mail.
 * 
 * This filter allows developers to customize the "From" email address of the
 * registration email, enabling dynamic sender selection.
 * 
 * @filter greyd_forms_registration_mail_from
 * 
 * @param string $mail_from Email address to send the registration mail from.
 * @param int    $post_id   WP_Post ID of the form.
 * @param array  $data      Validated form data.
 * @param string $token     Entry token for the registration.
 * 
 * @return string $mail_from Modified sender email address for the registration mail.
 */
$mail_from = apply_filters( 'greyd_forms_registration_mail_from', $mail_from, $post_id, $data, $token );

greyd_forms_registration_mail_from_name

Filter to modify the sender name for the registration confirmation mail.

This filter allows developers to customize the “From” name of the registration email, enabling dynamic sender name selection.

Parameters:

  • string $mail_from_name – Display name to send the registration mail from.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the registration.

Returns: string – Modified sender name for the registration mail.

PHP
/**
 * Filter to modify the sender name for the registration confirmation mail.
 * 
 * This filter allows developers to customize the "From" name of the
 * registration email, enabling dynamic sender name selection.
 * 
 * @filter greyd_forms_registration_mail_from_name
 * 
 * @param string $mail_from_name Display name to send the registration mail from.
 * @param int    $post_id        WP_Post ID of the form.
 * @param array  $data           Validated form data.
 * @param string $token          Entry token for the registration.
 * 
 * @return string $mail_from_name Modified sender name for the registration mail.
 */
$mail_from_name = apply_filters( 'greyd_forms_registration_mail_from_name', $mail_from_name, $post_id, $data, $token );

greyd_forms_registration_mail_headers

Filter to modify the email headers for the registration confirmation mail.

This filter allows developers to customize the email headers, enabling additional headers like Reply-To, CC, BCC, or custom headers.

Parameters:

  • array $headers – Array of email headers for the registration mail.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the registration.

Returns: array – Modified array of email headers.

PHP
/**
 * Filter to modify the email headers for the registration confirmation mail.
 * 
 * This filter allows developers to customize the email headers,
 * enabling additional headers like Reply-To, CC, BCC, or custom headers.
 * 
 * @filter greyd_forms_registration_mail_headers
 * 
 * @param array  $headers Array of email headers for the registration mail.
 * @param int    $post_id WP_Post ID of the form.
 * @param array  $data    Validated form data.
 * @param string $token   Entry token for the registration.
 * 
 * @return array $headers Modified array of email headers.
 */
$headers = apply_filters( 'greyd_forms_registration_mail_headers', $headers, $post_id, $data, $token );

Admin mail filters

greyd_forms_admin_mail_to

Filter to modify the recipient email address for the admin notification mail.

This filter allows developers to customize the email address that receives the admin notification email, enabling dynamic recipient selection based on form data or other conditions.

Parameters:

  • string $mail_to – Email address to send the admin notification mail to.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the form submission.

Returns: string – Modified email address for the admin notification mail.

PHP
/**
 * Filter to modify the recipient email address for the admin notification mail.
 * 
 * This filter allows developers to customize the email address that receives the
 * admin notification email, enabling dynamic recipient selection based on form data
 * or other conditions.
 * 
 * @filter greyd_forms_admin_mail_to
 * 
 * @param string $mail_to Email address to send the admin notification mail to.
 * @param int    $post_id WP_Post ID of the form.
 * @param array  $data    Validated form data.
 * @param string $token   Entry token for the form submission.
 * 
 * @return string $mail_to Modified email address for the admin notification mail.
 */
$mail_to = apply_filters( 'greyd_forms_admin_mail_to', $mail_to, $post_id, $data, $token );

greyd_forms_admin_mail_content

Filter to modify the content of the admin notification email.

This filter allows developers to customize the HTML content of the admin notification email, enabling dynamic content generation based on form data or other conditions.

Parameters:

  • string $content – Full HTML content of the admin notification email.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the form submission.

Returns: string – Modified HTML content for the admin notification email.

PHP
/**
 * Filter to modify the content of the admin notification email.
 * 
 * This filter allows developers to customize the HTML content of the admin
 * notification email, enabling dynamic content generation based on form data
 * or other conditions.
 * 
 * @filter greyd_forms_admin_mail_content
 * 
 * @param string $content Full HTML content of the admin notification email.
 * @param int    $post_id WP_Post ID of the form.
 * @param array  $data    Validated form data.
 * @param string $token   Entry token for the form submission.
 * 
 * @return string $content Modified HTML content for the admin notification email.
 */
$content = apply_filters( 'greyd_forms_admin_mail_content', $content, $post_id, $data, $token );

greyd_forms_admin_mail_subject

Filter to modify the subject line of the admin notification email.

This filter allows developers to customize the email subject line, enabling dynamic subject generation based on form data or other conditions.

Parameters:

  • string $subject – Email subject line for the admin notification mail.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the form submission.

Returns: string – Modified subject line for the admin notification email.

PHP
/**
 * Filter to modify the subject line of the admin notification email.
 * 
 * This filter allows developers to customize the email subject line,
 * enabling dynamic subject generation based on form data or other conditions.
 * 
 * @filter greyd_forms_admin_mail_subject
 * 
 * @param string $subject Email subject line for the admin notification mail.
 * @param int    $post_id WP_Post ID of the form.
 * @param array  $data    Validated form data.
 * @param string $token   Entry token for the form submission.
 * 
 * @return string $subject Modified subject line for the admin notification email.
 */
$subject = apply_filters( 'greyd_forms_admin_mail_subject', $subject, $post_id, $data, $token );

greyd_forms_admin_mail_from

Filter to modify the sender email address for the admin notification mail.

This filter allows developers to customize the “From” email address of the admin notification email, enabling dynamic sender selection.

Parameters:

  • string $mail_from – Email address to send the admin notification mail from.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the form submission.

Returns: string – Modified sender email address for the admin notification mail.

PHP
/**
 * Filter to modify the sender email address for the admin notification mail.
 * 
 * This filter allows developers to customize the "From" email address of the
 * admin notification email, enabling dynamic sender selection.
 * 
 * @filter greyd_forms_admin_mail_from
 * 
 * @param string $mail_from Email address to send the admin notification mail from.
 * @param int    $post_id   WP_Post ID of the form.
 * @param array  $data      Validated form data.
 * @param string $token     Entry token for the form submission.
 * 
 * @return string $mail_from Modified sender email address for the admin notification mail.
 */
$mail_from = apply_filters( 'greyd_forms_admin_mail_from', $mail_from, $post_id, $data, $token );

greyd_forms_admin_mail_from_name

Filter to modify the sender name for the admin notification mail.

This filter allows developers to customize the “From” name of the admin notification email, enabling dynamic sender name selection.

Parameters:

  • string $mail_from_name – Display name to send the admin notification mail from.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the form submission.

Returns: string – Modified sender name for the admin notification mail.

PHP
/**
 * Filter to modify the sender name for the admin notification mail.
 * 
 * This filter allows developers to customize the "From" name of the
 * admin notification email, enabling dynamic sender name selection.
 * 
 * @filter greyd_forms_admin_mail_from_name
 * 
 * @param string $mail_from_name Display name to send the admin notification mail from.
 * @param int    $post_id        WP_Post ID of the form.
 * @param array  $data           Validated form data.
 * @param string $token          Entry token for the form submission.
 * 
 * @return string $mail_from_name Modified sender name for the admin notification mail.
 */
$mail_from_name = apply_filters( 'greyd_forms_admin_mail_from_name', $mail_from_name, $post_id, $data, $token );

greyd_forms_admin_mail_headers

Filter to modify the email headers for the admin notification mail.

This filter allows developers to customize the email headers, enabling additional headers like Reply-To, CC, BCC, or custom headers.

Parameters:

  • array $headers – Array of email headers for the admin notification mail.
  • int $post_id – WP_Post ID of the form.
  • array $data – Validated form data.
  • string $token – Entry token for the form submission.

Returns: array – Modified array of email headers.

PHP
/**
 * Filter to modify the email headers for the admin notification mail.
 * 
 * This filter allows developers to customize the email headers,
 * enabling additional headers like Reply-To, CC, BCC, or custom headers.
 * 
 * @filter greyd_forms_admin_mail_headers
 * 
 * @param array  $headers Array of email headers for the admin notification mail.
 * @param int    $post_id WP_Post ID of the form.
 * @param array  $data    Validated form data.
 * @param string $token   Entry token for the form submission.
 * 
 * @return array $headers Modified array of email headers.
 */
$headers = apply_filters( 'greyd_forms_admin_mail_headers', $headers, $post_id, $data, $token );