wsf_action_email_message

Description

The wsf_action_email_message filter allows you to modify the Message when sending emails using the Send Email action. The message can contain WS Form variables. The message gets wrapped in the email template prior to being sent.

Usage

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

Parameters

  1. $message String
    The email message.
  2. $form Form Object
    The form object.
  3. $subject Submit Object
    The submit object.
  4. $action Array
    The action configuration.

Example

// Callback function for the wsf_action_email_message filter hook
function my_hook_function( $message, $form, $subject, $action ) {
	
	// Your code here ...

	// Return value
	return $message;
}

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

Source File

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