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 ($mailer, Quform_Notification $notification, Quform_Form $form) { // Custom code }, 10, 3); |
add_action('quform_pre_send_notification_1_1', function ($mailer, Quform_Notification $notification, Quform_Form $form) { // Custom code }, 10, 3);
- On line 1, replace the
1_1
with the notification unique ID
1
2
3
4
5 | function my_pre_send_notification($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($mailer, Quform_Notification $notification, Quform_Form $form) { // Custom code } add_action('quform_pre_send_notification_1_1', 'my_pre_send_notification', 10, 3);
- On line 5, replace the
1_1
with the notification unique ID
Parameters
$mailer
–PHPMailer
– the PHPMailer instance$notification
–Quform_Notification
– the notification instance$form
–Quform_Form
– the form instance
Accessing form data
quform_pre_send_notification
This hook is run for all notifications.
Example
1 2 3 | add_action('quform_pre_send_notification', function ($mailer, Quform_Notification $notification, Quform_Form $form) { // Custom code }, 10, 3); |
add_action('quform_pre_send_notification', function ($mailer, Quform_Notification $notification, Quform_Form $form) { // Custom code }, 10, 3);
1 2 3 4 5 | function my_pre_send_notification($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($mailer, Quform_Notification $notification, Quform_Form $form) { // Custom code } add_action('quform_pre_send_notification', 'my_pre_send_notification', 10, 3);
Parameters
$mailer
–PHPMailer
– the PHPMailer instance$notification
–Quform_Notification
– the notification instance$form
–Quform_Form
– the form instance