The following is a list of shortcodes that may be used in the email messages. Note: some shortcodes are only available in the admin message, and it is up to you to make sure that proper information is sent (i.e. if you remove [password] from the registration email, the user will not receive a password and thus not be able to login). The plugin installs with defaults for each of these messages to provide you with an example of what is available.
- [blogname] – the Site Title you have specified under Settings > General
- [email] – the email address the user registered with
- [reglink] – a link to the page the user registered on (useful to return a user directly to the content they registered to view)
- [user-profile] – the members area where, among other things, the user can change their random password to whatever they want (replaces [members-area] which will continue to work)
- [exp-type] – expiration type (subscription/trial) [available only if the PayPal Subscription Module is used]
- [exp-date] – the expiration date [available only if the PayPal Subscription Module is used]
- [login] – link to the login page if a login page is defined in the plugin’s main settings
- [register] – link to the registration page if a registration page is defined in the plugin’s main settings
- Additionally, any custom field is available based on the field’s option name/meta key found in the Fields tab (excludes “user_login” and “user_email”)
- [fields] – admin only – a list of any of the registration fields
- [user-ip] – admin only – the user’s IP address when they registered
- [activate-user] – admin only – a link to the user profile page so they can be activated (used if moderating registration)
As of 2.9.5, any field option name can be used as an email shortcode in both emails to users and admins. So if you have a custom field with the option name “my_field” you can use this in the email as [my_field].
Some important things to consider:
The plugin installs with certain default settings and email content. Based on your chosen way of using the plugin, you may need to alter the email content to make sense. Here are two important considerations.
- If you have added a password field to the registration process AND you have set the plugin to moderate registrations for admin approval, you cannot send the password in the “user is approved” email. If you intend to email a copy of the user’s login credentials in this configuration, you MUST do it in the initial welcome email. That means you will need to make some changes to the fields that are included in the default emails.
- The Members Area link is included in the initial email. However, this is assuming that you have set up a members area page using the members area shortcode and have noted the URL location of this page in the plugin’s settings. If you have not done that, this field will be blank in the message to the user.
If you have additional dynamic content from outside the plugin that needs to be included in your email to a user, there are filters available for this.