< Terms: Test Class   (Previous) Table of Contents (Next)   wp_mail(): Lame Test >

wp_mail(): So, I've Got This Method...

class oop_plugin_template_solution {
    protected function notify_login($user_name) {
        $to = get_site_option('admin_email');
        $subject = 'howdy';
        $blog = get_option('blogname');

        // __() passes the string though the translation process.
        $message = sprintf(__("%s just logged in to %s.", self::ID),
                $user_name, $blog) . "\n";

        return wp_mail($to, $subject, $message);
    }
}