Title: adolfopt's Replies | WordPress.org

---

# adolfopt

  [  ](https://wordpress.org/support/users/adolfopt/)

 *   [Profile](https://wordpress.org/support/users/adolfopt/)
 *   [Topics Started](https://wordpress.org/support/users/adolfopt/topics/)
 *   [Replies Created](https://wordpress.org/support/users/adolfopt/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/adolfopt/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/adolfopt/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/adolfopt/engagements/)
 *   [Favorites](https://wordpress.org/support/users/adolfopt/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Visual Form Builder] How do I send emails to different people based on field entry?](https://wordpress.org/support/topic/how-do-i-send-emails-to-different-people-based-on-field-entry/)
 *  [adolfopt](https://wordpress.org/support/users/adolfopt/)
 * (@adolfopt)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-send-emails-to-different-people-based-on-field-entry/page/2/#post-3470539)
 * Ops! Really sorry about posting in resolved thread. Thanks for your response 
   anyway.
 * I have created a new topic [here](http://wordpress.org/support/topic/plugin-visual-builder-form-pro-problem-using-vfb_override_email_-action?replies=1).
 * Apologies.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Visual Form Builder] How do I send emails to different people based on field entry?](https://wordpress.org/support/topic/how-do-i-send-emails-to-different-people-based-on-field-entry/)
 *  [adolfopt](https://wordpress.org/support/users/adolfopt/)
 * (@adolfopt)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-send-emails-to-different-people-based-on-field-entry/page/2/#post-3470537)
 * Just a bit more information. I have tried to add other hook, in order to check
   if everything is fine.
 * And the other hook worked… see:
 *     ```
       add_action( 'vfb_confirmation', 'vfb_action_confirmation', 10, 2 );
   
       function vfb_action_confirmation( $form_id, $entry_id ){
       	?>
       		<script type="text/javascript">alert('Hello vfb_confirmation');</script>
        	<?php
       }
   
       add_action( 'vfb_override_email_5', 'vfb_action_override_email', 10, 5);
   
       function vfb_action_override_email( $emails_to, $form_subject, $message, $headers, $attachments ){
           ?>
        	<script type="text/javascript">alert('Hellow override');</script>
   
           <?php
           // Checks radio button. Use Merge Tag to easily get $_POST id
           $emails_to = array( $_POST['vfb-87'], 'xxx_xxx@hotmail.com' );
               // Send the mail
           foreach ( $emails_to as $email ) {
               wp_mail( $email, $form_subject, $message, $headers, $attachments );
           }
       }
       ```
   
 * After submitting the form I saw “Hello vfb_confirmation”, but nothing about the
   override stuff.
 * Thanks in advance.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Visual Form Builder] How do I send emails to different people based on field entry?](https://wordpress.org/support/topic/how-do-i-send-emails-to-different-people-based-on-field-entry/)
 *  [adolfopt](https://wordpress.org/support/users/adolfopt/)
 * (@adolfopt)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-send-emails-to-different-people-based-on-field-entry/page/2/#post-3470536)
 * Hi all,
 * first of all say congratulations for you awesome plugin.
 * One question, I am trying to use the vfb_override_email_ hook, but I do not know
   why, but it does not work.
 * In the email setting’s form I have introduced my email, and when I submit the
   form I receive it, That is perfect.
 * But the plugin ignores the hook.
 * I am using the PageLines as a theme’s provider.
 * What am I missing? Do I need to do an extra configuration??
 * Thanks in advance.
 * That is my code (and the form id is 5).
 *     ```
       /*
       // ====================================================
       // = YOUR FUNCTIONS - Where you should add your code  =
       // ====================================================
       */
   
       add_action( 'vfb_override_email_5', 'vfb_action_override_email',  10, 5);
   
       function vfb_action_override_email( $emails_to, $form_subject, $message, $headers, $attachments ){
           alert('Hook working 5');
           // Checks radio button. Use Merge Tag to easily get $_POST id
           $emails_to = array( $_POST['vfb-87'], 'xxx_xx@hotmail.com' );
               // Send the mail
           foreach ( $emails_to as $email ) {
               wp_mail( $email, $form_subject, $message, $headers, $attachments );
           }
       }
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)