quform_pre_send_notification

The Quform WordPress v2 documentation is not yet finished. Please post on the forums if you have any questions in the mean time.

Click here to visit the complete documentation for Quform 1.x

This hook is run before a notification email is sent.

quform_pre_send_notification_X_X

This hook is run for a single notification.

Example

12
3
add_action('quform_pre_send_notification_1_1', function (PHPMailer $mailer, Quform_Notification $notification, Quform_Form $form) {    // Custom code    
}, 10, 3);
add_action('quform_pre_send_notification_1_1', function (PHPMailer $mailer, Quform_Notification $notification, Quform_Form $form) {
    // Custom code    
}, 10, 3);
1
2
3
4
5
function my_pre_send_notification(PHPMailer $mailer, Quform_Notification $notification, Quform_Form $form)
{
    // Custom code    
}
add_action('quform_pre_send_notification_1_1', 'my_pre_send_notification', 10, 3);
function my_pre_send_notification(PHPMailer $mailer, Quform_Notification $notification, Quform_Form $form)
{
    // Custom code    
}
add_action('quform_pre_send_notification_1_1', 'my_pre_send_notification', 10, 3);

Parameters

  • $mailerPHPMailer – the PHPMailer instance
  • $notificationQuform_Notification – the notification instance
  • $formQuform_Form – the form instance

Accessing form data

See Getting form values

quform_pre_send_notification

This hook is run for all notifications.

Example

1
2
3
add_action('quform_pre_send_notification', function (PHPMailer $mailer, Quform_Notification $notification, Quform_Form $form) {
    // Custom code    
}, 10, 3);
add_action('quform_pre_send_notification', function (PHPMailer $mailer, Quform_Notification $notification, Quform_Form $form) {
    // Custom code    
}, 10, 3);
1
2
3
4
5
function my_pre_send_notification(PHPMailer $mailer, Quform_Notification $notification, Quform_Form $form)
{
    // Custom code    
}
add_action('quform_pre_send_notification', 'my_pre_send_notification', 10, 3);
function my_pre_send_notification(PHPMailer $mailer, Quform_Notification $notification, Quform_Form $form)
{
    // Custom code    
}
add_action('quform_pre_send_notification', 'my_pre_send_notification', 10, 3);

Parameters

  • $mailerPHPMailer – the PHPMailer instance
  • $notificationQuform_Notification – the notification instance
  • $formQuform_Form – the form instance

Accessing form data

See Getting form values

Guides using this hook

Still having trouble? Head over to the forums.

Forums