Title: Email shortcodes
Last modified: August 31, 2016

---

# Email shortcodes

 *  Resolved [navyspitfire](https://wordpress.org/support/users/navyspitfire/)
 * (@navyspitfire)
 * [10 years ago](https://wordpress.org/support/topic/email-shortcodes/)
 * Are there any other shortcodes besides [username]? Specifically trying to use
   a first name field.
 * [https://wordpress.org/plugins/bp-registration-options/](https://wordpress.org/plugins/bp-registration-options/)

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

 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years ago](https://wordpress.org/support/topic/email-shortcodes/#post-7386028)
 * Not really, there’s just the two out of box.
 * Are you looking more for the sent-to-user email or the sent-to-admin email? I
   believe I have filters in place on message content in a couple places that could
   be used to do your own php string replacement, which is all we do. Just need 
   to determine which place you intend this for so I can point to the correct filter.
 *  Thread Starter [navyspitfire](https://wordpress.org/support/users/navyspitfire/)
 * (@navyspitfire)
 * [10 years ago](https://wordpress.org/support/topic/email-shortcodes/#post-7386029)
 * Sent to user. Essentially I want to swap out all instances of username for first
   name, or email if first name is not doable.
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [10 years ago](https://wordpress.org/support/topic/email-shortcodes/#post-7386043)
 * Looks like I have the following in the current version:
 * **When a user is approved or denied:**
 *     ```
       $mailme = array(
       	'user_email' => $user->data->user_email,
       	'user_subject' => $subject,
       	'user_message' => str_replace( '[username]', $user->data->user_login, $message )
       );
   
       $mailme_filtered = apply_filters( 'bpro_hook_before_email', $mailme, $user );
       ```
   
 * The `$message` variable is the appropriate spot from the options page.
    The `
   $mailme` array gets passed through the filter, and you could have your own shortcodes
   at the moment that you can filter/replace with whatever data you want. We provide
   the `$user` object as well, so you can grab what you need.
 * We also have one for the admin email, but you’re focused more on the user-email.
 * We do NOT have a filter available for the activation’s pending email at the moment.
 * Going to leave this tab open so that I can remind myself to file enhancement 
   issues for some of these spots and get them filled in in a future version.

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

The topic ‘Email shortcodes’ is closed to new replies.

 * ![](https://ps.w.org/bp-registration-options/assets/icon-256x256.png?rev=2882040)
 * [Registration Options for BuddyPress](https://wordpress.org/plugins/bp-registration-options/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bp-registration-options/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bp-registration-options/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-registration-options/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-registration-options/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-registration-options/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)
 * [Registration](https://wordpress.org/support/topic-tag/registration/)

 * 3 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/email-shortcodes/#post-7386043)
 * Status: resolved