Title: notifyheaders Sender Name / Filter From:
Last modified: April 20, 2017

---

# notifyheaders Sender Name / Filter From:

 *  Resolved [guiberlin](https://wordpress.org/support/users/guiberlin/)
 * (@guiberlin)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/notifyheaders-sender-name-filter-from/)
 * Hi there,
 * thank you for the great plugin first of all 🙂
 * I’ve been fighting for a few hours now and don’t manage to get what I’d like 
   to achieve.
 * Basically I would like to have the name and the email of the uploader in the “
   From” notification email (that way, we automatically create a ticket in our ticket
   system).
 * In the notifiyheaders it works but only with a “fix” name and email:
 * notifyheaders=”From: Bob <bob@bobcorporation.com> is ok
 * notifyheaders=”From: %userdata3% <%userdata4%> All seems fine, no error message
   BUT I never get the notification email.
 * I tried all the combination I could think of but without success so far.
 * My %userdata4% is the email adress and I know it works. If I use it in the email
   recipient field, it is sent to the email entered by the uploader in the form.
 * I’d be really thankful for some help 🙂
 * Guillaume

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

 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/notifyheaders-sender-name-filter-from/#post-9051897)
 * Hi,
 *  Are you trying to put variables inside the headers? Unfortunately this is not
   supported. However you can do it with a hook. Here it is how:
 * 1. Go to plugin’s section in Dashboard, in Hooks tab and add a new hook.
    2. 
   Give it any title you want. 3. Put the following code in the Code box:
 *     ```
       if (!function_exists('wfu_before_email_notification_handler')) {
       	function wfu_before_email_notification_handler($changable_data, $additional_data) {
       		$changable_data["headers"] = "From: ".$changable_data["user_data"][2]["value"]." <".$changable_data["user_data"][3]["value"].">";
       		return $changable_data;
       	}
       	add_filter('wfu_before_email_notification', 'wfu_before_email_notification_handler', 10, 2); 
       }
       ```
   
 * 4. Set Status to Active and Save.
 * You are done (hopefully).
 * If you do not have the Pro version that supports hooks, simply put the code at
   the end of your functions.php file.
 * Regards
 * Nickolas
 *  Thread Starter [guiberlin](https://wordpress.org/support/users/guiberlin/)
 * (@guiberlin)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/notifyheaders-sender-name-filter-from/#post-9060857)
 * Hi Nickolas,
 * it worked perfectly!
 * Thank you very much for the fast and excellent support.
 * I just bought the pro version.
 * Have a lovely day.
 * Guillaume
 *  [Lisa Thompson](https://wordpress.org/support/users/lisaweb/)
 * (@lisaweb)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/notifyheaders-sender-name-filter-from/#post-9074862)
 * I was just going to ask about this when I saw the answer here. Thanks from me
   too!
 *  [Lisa Thompson](https://wordpress.org/support/users/lisaweb/)
 * (@lisaweb)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/notifyheaders-sender-name-filter-from/#post-9076359)
 * We bought the Pro Version, and I just tried to creating a hook with the code 
   above. But I am getting the following error:
 * > Hook has been saved but cannot be activated because the code contains errors.
   > Please check its syntax.
 * My data fields are different, the Name is %userdata1% and the Email is %userdata2%,
   so I changed the reference numbers in the code based on that (see below) but 
   I am still getting that error. Any idea what might be causing it? Thanks.
 *     ```
       if (!function_exists('wfu_before_email_notification_handler')) {
       	function wfu_before_email_notification_handler($changable_data, $additional_data) {
       		$changable_data["headers"] = "From: ".$changable_data["user_data"][1]["value"]." <".$changable_data["user_data"][2]["value"].">";
       		return $changable_data;
       	}
       	add_filter('wfu_before_email_notification', 'wfu_before_email_notification_handler', 10, 2); 
       }
       ```
   
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/notifyheaders-sender-name-filter-from/#post-9077427)
 * Hi, I think the code is Ok. The problem is that the security settings of your
   website do not allow the plugin to check the code for errors.
 * Please go to Settings and activate option “ModSecurity Restrictions”. This will
   make the hook work.
 * Nickolas
 *  [sukhjeet](https://wordpress.org/support/users/sukhjeet/)
 * (@sukhjeet)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/notifyheaders-sender-name-filter-from/#post-9139950)
 * Hello need a help on this
    I have implemented same in the function.php but still
   that finction doenot get call
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/notifyheaders-sender-name-filter-from/#post-9145321)
 * Hi, can you please send me the code?
 *  [sukhjeet](https://wordpress.org/support/users/sukhjeet/)
 * (@sukhjeet)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/notifyheaders-sender-name-filter-from/#post-9147947)
 * [@nickboss](https://wordpress.org/support/users/nickboss/) thank for your response
 * Now i have just solved it out
 * Thank you.:-)

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

The topic ‘notifyheaders Sender Name / Filter From:’ is closed to new replies.

 * ![](https://ps.w.org/wp-file-upload/assets/icon-256x256.png?rev=3252590)
 * [Iptanus File Upload](https://wordpress.org/plugins/wp-file-upload/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-file-upload/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-file-upload/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-file-upload/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-file-upload/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-file-upload/reviews/)

 * 8 replies
 * 4 participants
 * Last reply from: [sukhjeet](https://wordpress.org/support/users/sukhjeet/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/notifyheaders-sender-name-filter-from/#post-9147947)
 * Status: resolved