Skip to content

s2_sanitize_email

  • Subscribe2
  • Updated Nov 23, 2023
  • 1 min read

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');

Last updated on

Filed under Hooks, API & Customization

Still stuck?

Our support team can walk you through it.