Title: Email notification parameters values empty
Last modified: August 22, 2016

---

# Email notification parameters values empty

 *  Resolved [systus232](https://wordpress.org/support/users/systus232/)
 * (@systus232)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/email-notification-parameters-values-empty/)
 * Hi,
 * Nice product, but when someone vote for any Yop Poll i get the email notification
   without any values: see below
 * A new vote was registered on %VOTE_DATE% for %POLL_NAME%
    Vote Details: Votez
   pour l\’hypnose-mp3 à créer par Hypnose Attitude. Question: %QUESTION_TEXT% Answers:
   Confiance en soi %ANSWER_VALUE% [/ANSWERS] Custom Fields: %CUSTOM_FIELD_NAME%–%
   CUSTOM_FIELD_VALUE% [/CUSTOM_FIELDS] [/QUESTION] Vote ID: %VOTE_ID%
 * Any idea?
 * Regards
 * [https://wordpress.org/plugins/yop-poll/](https://wordpress.org/plugins/yop-poll/)

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

 *  Plugin Author [YOP](https://wordpress.org/support/users/yourownprogrammer/)
 * (@yourownprogrammer)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/email-notification-parameters-values-empty/#post-5266739)
 * Hi systus232,
 * In the email body, replace every occurrence of %xyz% with [xyz] (for example,
   replace %VOTE_DATE% with [ VOTE_DATE]).
 * Let us know if you need more help.
 * Regards,
 * YOP Team
 *  Thread Starter [systus232](https://wordpress.org/support/users/systus232/)
 * (@systus232)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/email-notification-parameters-values-empty/#post-5266748)
 * Hi Yop,
 * thanks that’s better, If I have a registered user what are the values I should
   add? I need their email adress and last_name?
 * Thanks and regards
 *  Plugin Author [YOP](https://wordpress.org/support/users/yourownprogrammer/)
 * (@yourownprogrammer)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/email-notification-parameters-values-empty/#post-5266791)
 * Hey systus232,
 * Edit yop_poll_model.php and in register_vote function, after
 * `$body = str_replace( '[POLL_NAME]', $this->poll['name'], $poll_options['email_notifications_body']);`
 * add
 *     ```
       $user_info = get_userdata($voter['user_id']);
                                                                   $body = str_replace( '[EMAIL_USER]', $user_info->user_email , $body );
       $body = str_replace( '[NAME_USER]', $user_info->user_lastname , $body );
       ```
   
 * Next, edit the poll and in Notifications Body: add the tags [EMAIL_USER] and [
   NAME_USER]
 * Best wishes,
 * YOP Team
 *  Thread Starter [systus232](https://wordpress.org/support/users/systus232/)
 * (@systus232)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/email-notification-parameters-values-empty/#post-5266794)
 * Hi,
 * I have add the lines
 *  $body = str_replace( ‘[POLL_NAME]’, $this->poll[‘name’], $poll_options[’email_notifications_body’]);
 *  $user_info = get_userdata($voter[‘user_id’]);
    $body = str_replace( ‘[EMAIL_USER]’,
   $user_info->user_email , $body ); $body = str_replace( ‘[NAME_USER]’, $user_info-
   >user_lastname , $body );
 *  $body = str_replace( ‘[QUESTION]’, $this->poll[‘question’], $body );
 * And into the Yop Poll
 * <p>Un nouveau vote [VOTE_DATE] pour [POLL_NAME]</p>
 * <p>Details:</p>
 * [QUESTION]
 * <p><b>Réponse:</b>
 * [ANSWERS]
 * </p>
 * <p><b>VoteID:</b>
   [VOTE_ID]</p>
 * [EMAIL_USER] and [NAME_USER]
 * But I get
 * Details:
    Votez pour le thème que vous voulez voir créé par Hypnose Attitude.
   Réponse: Prendre confiance VoteID: vote_id_54108f39629f2 [EMAIL_USER] and [NAME_USER]
 * Where is my mistake?
 * Regards
 *  Plugin Author [YOP](https://wordpress.org/support/users/yourownprogrammer/)
 * (@yourownprogrammer)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/email-notification-parameters-values-empty/#post-5266811)
 * Hey systus232,
 * After
 * `$body = str_replace( '[POLL_NAME]', $this->poll['name'], $poll_options['email_notifications_body']);`
 * add
 *     ```
       $user_info = get_userdata($voter['user_id']);
                                                                   $body = str_replace( '[EMAIL_USER]', $user_info->user_email , $body );
       $body = str_replace( '[NAME_USER]', $user_info->user_lastname , $body );
       ```
   
 * Let us know if you need more help.
 * Regards,
 * YOP Team
 *  [macek333](https://wordpress.org/support/users/macek333/)
 * (@macek333)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/email-notification-parameters-values-empty/#post-5266878)
 * Hi,
    I finally right place above code 🙂 But please, insert it directly into 
   the official version to another update came.
 * Thank you very much

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

The topic ‘Email notification parameters values empty’ is closed to new replies.

 * ![](https://ps.w.org/yop-poll/assets/icon-256x256.png?rev=3524390)
 * [YOP Poll](https://wordpress.org/plugins/yop-poll/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yop-poll/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yop-poll/)
 * [Active Topics](https://wordpress.org/support/plugin/yop-poll/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yop-poll/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yop-poll/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [macek333](https://wordpress.org/support/users/macek333/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/email-notification-parameters-values-empty/#post-5266878)
 * Status: resolved