Adding BCC recipients to the autoreply email

This documentation page is for Quform version 1 and may not be applicable for Quform 2 click here to visit the documentation for Quform 2.

This guide will show you how to add BCC recipients to the autoreply email. This will be done inside a filter hook PHP function.

Step 1

Get the unique ID of your Quform form, see Finding the form ID.

Step 2

Add the following code to the wp-content/themes/YOUR_THEME/functions.php file (or create a plugin for it).

1
2
34
5
6
7
function my_add_autoreply_bcc($mailer, $form, $attachments)
{
    $mailer->AddBCC('recipient1@example.com'); 
    return $mailer;
}
add_filter('iphorm_pre_send_autoreply_email_2', 'my_add_autoreply_bcc', 10, 3);
function my_add_autoreply_bcc($mailer, $form, $attachments)
{
    $mailer->AddBCC('recipient1@example.com');

    return $mailer;
}
add_filter('iphorm_pre_send_autoreply_email_2', 'my_add_autoreply_bcc', 10, 3);
  • On line 3, change recipient1@example.com to the email address to set as a BCC, duplicate this line for additional recipients.
  • On line 7, change the number 2 to the unique ID of form, from Step 1

See also

For more examples of what you can do with the PHPMailer object, see http://www.ustrem.org/en/articles/send-mail-using-phpmailer-en/

Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy