The wsf_action_email_email_validate filter allows you to validate email addresses prior to sending emails using the Send Email action.

A detailed tutorial about using this filter can be found here:


add_filter( wsf_action_email_email_validate, 'my_hook_function', 10, 4 );


  1. $valid Boolean
    Whether the email address is valid or not. Set to false to invalidate the email address.
  2. $email String
    The email address.
  3. $form_id Integer
    The form ID.
  4. $field_id Integer
    The field ID. Will be set to false when emails are checked at Send Email action level.


// Add a callback function for the wsf_action_email_email_validate filter hook
add_filter( wsf_action_email_email_validate, 'my_hook_function', 10, 4 );

// Callback function for the wsf_action_email_email_validate filter hook
function my_hook_function( $valid, $email, $form_id, $field_id ) {
	// Your code here ...

	// Return value
	return $valid;

Source File

This hook can be found in: <plugin root>/includes/actions/class-ws-form-action-email.php