Block to accept and send email to specific domains

strpos will return 0 for a positive match at the start of a string, so your condition != false will evaluate as false – in other words… $email_domain = ‘b-mail.online’; if ( strpos( $email_domain, ‘b-mail.online’ ) != false ) { // Will never reach here } …this is because != is known as a loose … Read more