1. Home
  2. Docs
  3. Subscribe2
  4. Hooks, API & Customization
  5. s2_sanitize_email


This hook allows email address passed through the Subscribe2 HTML sanitise_email() function to be filtered. I get asked about emails from time to time because Subsribe2 HTML complies fully with RFC3521; treating the user part of the email before the @ as case sensitive. Some people don’t like this, so this filter is a solution.

function my_s2_sanitize_email( $email ) {
    // return a filtered email address, for example with all letters in lower case
    return strtolower( $email );
add_filter('s2_sanitize_email', 'my_s2_sanitize_email');
Was this article helpful to you? Yes No

How can we help?