Special Mail Tags are used to collect information in addition to what the user submits with the contact form. Special Mail Tags are independent from Form Tags and user input. They can be used wherever Mail Tags can be used.
- [_remote_ip] – the submitting user’s IP address
- [_user_agent] – the submitting user’s browser’s user-agent string
- [_url] – the URL of the page the contact form is on
- [_date] – the date the form is submitted
- [_time] – the time the form is submitted
- [_invalid_fields] – the number of fields containing invalid input
Post-Related Special Mail Tags
Post-related tags only work if the contact form shortcode is placed in a post or page. They will return empty strings if the contact form shortcode is in a theme template or widget.
- [_post_id] – the ID of the post
- [_post_name] – the slug of the post
- [_post_title] – the title of the post
- [_post_url] – the permalink of the post
- [_post_author] – the author of the post
- [_post_author_email] – the post author’s email address
These tags return information about the website where the contact forms are used.
- [_site_title] – the title of the site
- [_site_description] – the description of the site (Settings, General, Tagline)
- [_site_url] – the home URL of the site
- [_site_admin_email] – the email address of the primary admin of the site
These tags return user-related information for the user logged-in when the form is submitted. Because these tags only work if a user is logged-in, it’s best to turn on subscribers-only mode if you plan to use them.
- [_user_login] – returns the login name of the currently logged-in user
- [_user_email] – the user’s email address
- [_user_url] – the user’s website URL
- [_user_first_name] – the user’s first name
- [_user_last_name] – the user’s last name
- [_user_nickname] – the user’s nickname
- [_user_display_name] – the user’s display name