Title: Shortcode in mail
Last modified: December 4, 2018

---

# Shortcode in mail

 *  Resolved [boomalex](https://wordpress.org/support/users/boomalex/)
 * (@boomalex)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/shortcode-in-mail/)
 * Trying to be able to use this car look up function to display in a form which
   can be sent via email. If you go to : [http://www.engine-repair.co.uk/](http://www.engine-repair.co.uk/)
   type in a reg number and fill in the form, I would like those details to also
   show in the email but it is currently just showing the shorcode
 *     ```
       Make: [ukvd_getbasicitem dataitem='make']
   
       Model: [ukvd_getbasicitem dataitem='model']
   
       Year: [ukvd_getbasicitem dataitem='year']
   
       Colour: [ukvd_getbasicitem dataitem='colour']
   
       <label> Your Name (required)
           [text* your-name] </label>
   
       <label> Your Email (required)
           [email* your-email] </label>
   
       <label> Subject
           [text your-subject] </label>
   
       <label> Your Message
           [textarea your-message] </label>
   
       [submit "Send"]
       ```
   
 * Function trying in function.php
 *     ```
       function addUkvdMailTags( $output, $name, $html ) {
       if ( ‘ukvd_getbasicitem_make‘ == $name )
       $output = do_shortcode( "[ukvd_getbasicitem dataitem='make']" );
       return $output;
       }
       	    add_filter( 'wpcf7_special_mail_tags', 'addUkvdMailTags' , 10, 3 );
       ```
   
 * Any help is much appreciated, thank you.
    -  This topic was modified 7 years, 5 months ago by [boomalex](https://wordpress.org/support/users/boomalex/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshortcode-in-mail%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Zimpel](https://wordpress.org/support/users/tz-media/)
 * (@tz-media)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-mail/#post-11485651)
 * Hi [@boomalex](https://wordpress.org/support/users/boomalex/),
 * First of all, sorry for the late answer to your question.
 * You need to add a function like this for all shortcodes that you need in your
   email template.
 * However, you don’t have to use the original shortcode in your email template,
   but e.g. `[ukvd_getbasicitem_make]`.
 * Hope this helps. If not, feel free to reply here and I’ll to help you.
 * I’m currently working on a version of the plugin that provides a user interface
   for adding shortcodes to the system, instead of having to add custom PHP code.
 * Best regards,
 * Tobias

Viewing 1 replies (of 1 total)

The topic ‘Shortcode in mail’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-shortcode-enabler.
   svg)
 * [Contact Form 7 Shortcode Enabler](https://wordpress.org/plugins/contact-form-7-shortcode-enabler/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-shortcode-enabler/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-shortcode-enabler/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-shortcode-enabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-shortcode-enabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-shortcode-enabler/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Zimpel](https://wordpress.org/support/users/tz-media/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/shortcode-in-mail/#post-11485651)
 * Status: resolved