You will want to use sanitize_email();
as follows:
return( sanitize_email( $email ) );
Here is the Codex link so you have it: http://codex.wordpress.org/Function_Reference/sanitize_email
Cheers!
Related Posts:
- Adding the_content() in custom template email
- why doesn’t the_content() work in this {single-custom_post_type.php} page?
- Get random custom-post-type post to display within content
- Getting a div content of a post in wordpress?
- Custom post type without editor or revisions – Notify on update?
- How to auto send email when publishing a custom post type?
- Remove tinyMCE from admin and replace with textarea
- Wp-query causing problems with the_content();
- How do I set the content for a post of a particular CPT?
- Post Via Email to a Custom Post Type
- Rendering Custom Post Types independently of the theme in use
- Add $more_link_text parameter to the_excerpt()
- Exclude the_content (); from page password protection
- Sending an email when a CPT is saved/updated (NOT when it’s created)
- Email friend for each Custom Post Type posts on a page
- Send email button in custom post type backend
- the_content() not outputting anything (Advanced Custom Fields)
- Notify admin on new submit
- get_post_meta returning no value in custom post type alert email
- Content vs Template on custom post
- the_content filter on some post types only not working
- How can the recipients and content for comment email notifications on a custom post type be changed?
- Is it better to use filter for the_content in archive pages?
- What functions does WordPress use for filtering / sanitizing comments?
- data-type=”” … needed post tags stripped of characters
- the_content(); of custom post type treated as an array or object
- Dynamic bootstrap tabs with post_title doesn’t display the_content
- How can I remove filters from custom post types?
- How to insert data into meta box from another plugin?
- Add shortcode inside of the_content()
- Generate new post from email
- Separate Content from gallery (custom post type)
- Send email messages after comment was submitted
- Send post changes to set email addresses (not users or subscribers)
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- filter the_content, custom post type, and wp_query
- Extending post by email
- Add Content Column to Custom Post Type backend
- See if the email exists or not
- Creating post template for a Custom Post Type
- CPT email notification including only new value custom fields
- Auto generate excerpt from ACF field on a CPT that does not support excerpt or content
- Send email to author of the post when the custom post status changes to published
- Send mail to author when custom post type is saved
- Filter Content on all Post Types
- Expandable WordPress content (text) inside a post
- BCC email to subscribers
- send email to all registered users when post expires
- CPT Metabox with email notification
- Add HTML before a specific div?
- Emailing Authors only when a CUSTOM POST TYPE post is published- not when edited later [duplicate]
- How to create a job post by email parsing? [closed]
- Send email on creation of custom post type and use get_post_meta()
- Listing custom post type items from a couple of custom taxonomies
- 404 on Pages for Custom Post Type & Query_Posts
- Capability to read user’s own draft post of CPT
- Custom Post Query Combined with Conditional Tags
- Custom post type and custom taxonomy archive inaccessible
- Classic Custom Post Types and WP-PageNavi
- Can I set a CPT title field to a dropdown with preset options if user is of a given type?
- Check in function on custom page
- How to Display Custom Taxonomies in an Un-ordered HTML List
- List of filtered Events is breaking paging?
- Permalink of Custom Post Type
- 404 with Custom Post Type
- Make future posts visible to the public—not just within WP_Query
- Trying to display next and previous set of posts on separate page (not parent page)
- Pagination not working with custom loop
- Custom taxonomy archive page not routing?
- Building a List of Posts grouped by custom taxonomy as the section header only to be displayed if at least one post is in that tax
- Custom loop won’t work, can’t find problem
- link posts to custom post type
- single-mySlug.php works: archive-mySlug.php does not. Custom Post Type
- 2 language CPT content
- Problem with a query in custom posts
- Custom post-type’s pagination not working in category.php
- how to create a post type like comments
- Targeting specific Page Template for sidebar page
- Generate daily archive whenever any post type is added
- Adjust layout most recent post, taking pagination into account
- Custom post type navigation – 404 on page 2
- Dynamically change post_parent in every page load?
- Using custom post types within a section of a template
- Query by post type or category
- Page that ‘subscribes’ to multiple categories
- Two different archive pages showing the same content
- Pulling in a particular post into a single page based on the post id passed into the code
- sort custom post type by display name
- Canonicalization + Custom Post Types not working as expected
- Problem with custom post type search
- Allow certain part of a page to be easily updated for client?
- Custom role, capabilities, and post type: preview button wrecks things
- Most efficient way of deleting post
- categories of custom post type shows in CMS but not in the frontend webpage
- Problem with menu categories doubling up when updating database?
- Custom Portfolio String
- Noob Loop Question
- Creating shortcodes with user created forms
- Loading one meta box only on post-new.php with a forward link
- Categories and page filtering with pre_get_posts