Sanitizing and validating email field

According to the documentation, is_email() is used to validate an email and either returns the email if it is valid or false if it isn’t. So are using it correctly. The only thing I can see in your code is that if the email is not valid, you are settings the data to a boolean … Read more

apostrophe in email name

Filter is_email and sanitize_email, then apply a better check: namespace Wpse\Email; add_filter( ‘is_email’, __NAMESPACE__ . ‘\check_mail_address’, 10, 2 ); add_filter( ‘sanitize_email’, __NAMESPACE__ . ‘\check_mail_address’, 10, 2 ); function check_mail_address( $result, $email ) { return filter_var( $email, FILTER_VALIDATE_EMAIL ); } The PHP function is still not RFC 5321 compliant, but better than the WordPress check.

Joining confirmation email

Not sure how to close this post. I used WP better emails plugin http://wordpress.org/extend/plugins/wp-better-emails/ on the subsites and it removed the wordpress email address. (I was only using it on the main site before so it didn’t work.) Thanks.

email wordpress users using BCC

First: Don’t use mail(). Use wp_mail() instead. wp_mail( // Send it to yourself get_option( ‘admin_email’ ), ‘Your subject’, ‘Your message’, // extra headers array ( ‘Bcc:’ . implode( “,”, $usersarray ), ‘From:’ . get_option( ‘admin_email’ ) ) );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)