iphorm_pre_send_autoreply_email

This hook is run before sending the autoreply email.

iphorm_pre_send_autoreply_email

This hook is run for all forms.

Example

1
2
3
4
5
6
7
8
function my_pre_send_autoreply_email($mailer, $form, $attachments)
{
    // Custom code
 
    // You must return the $mailer object
    return $mailer;
}
add_filter('iphorm_pre_send_autoreply_email', 'my_pre_send_autoreply_email', 10, 3);
function my_pre_send_autoreply_email($mailer, $form, $attachments)
{
    // Custom code

    // You must return the $mailer object
    return $mailer;
}
add_filter('iphorm_pre_send_autoreply_email', 'my_pre_send_autoreply_email', 10, 3);

Parameters

  • $mailer – the PHPMailer instance
  • $form – the iPhorm instance
  • $attachments – an array of the email attachments

Accessing form data

See Getting form values

iphorm_pre_send_autoreply_email_X

This hook is run for a single form, replace X with the form ID.

Example

1
2
3
4
5
6
7
8
function my_pre_send_autoreply_email($mailer, $form, $attachments)
{
    // Custom code
 
    // You must return the $mailer object
    return $mailer;
}
add_filter('iphorm_pre_send_autoreply_email_1', 'my_pre_send_autoreply_email', 10, 3);
function my_pre_send_autoreply_email($mailer, $form, $attachments)
{
    // Custom code

    // You must return the $mailer object
    return $mailer;
}
add_filter('iphorm_pre_send_autoreply_email_1', 'my_pre_send_autoreply_email', 10, 3);

Parameters

  • $mailer – the PHPMailer instance
  • $form – the iPhorm instance
  • $attachments – an array of the email attachments

Accessing form data

See Getting form values

Other guides using this hook

See also

Still having trouble? Head over to the forums.

Forums