file = __FILE__; $register->slug = "checkemail"; $register->name = "Check Email"; $register->version = "0.5.7"; $register->developer = "Chris Taylor"; $register->homepage = "http://www.stillbreathing.co.uk"; $register->Register(); // add the admin menu option add_action( 'admin_menu', 'checkemail_add_admin' ); function checkemail_add_admin() { add_submenu_page( 'tools.php', __("Check Email", "check-email"), __("Check Email", "check-email"), 'edit_users', 'checkemail', 'checkemail' ); } // add the JavaScript add_action( 'admin_head', 'checkemail_add_js' ); function checkemail_add_js() { if ( isset( $_GET["page"] ) && $_GET["page"] == "checkemail" ) { echo ' '; } } // add the CSS add_action( 'admin_head', 'checkemail_add_css' ); function checkemail_add_css() { if ( isset( $_GET["page"] ) && $_GET["page"] == "checkemail" ) { echo ' '; } } // load the check email admin page function checkemail() { global $current_user; $from_email = apply_filters( 'wp_mail_from', $current_user->user_email ); $from_name = apply_filters( 'wp_mail_from_name', $from_name ); echo '
' . __( 'The test email has been sent by WordPress. Please note this does NOT mean it has been delivered. See wp_mail in the Codex for more information. The headers sent were:', "check-email" ) . '
' . str_replace( chr( 10 ), '\n' . "\n", str_replace( chr( 13 ), '\r', $headers ) ) . '
' . __( 'Security check failed', "check-email" ) . '
' . __( "SendMail path (UNIX):", "check-email" ) . ' ' . ini_get("sendmail_path") . '
' . __( "SMTP server (Windows):", "check-email" ) . ' ' . ini_get("SMTP") . '
' . __( "SMTP port (Windows):", "check-email" ) . ' ' . ini_get("smtp_port") . '
' . __( "Add X header:", "check-email" ) . ' ' . ini_get("mail.add_x_header") . '