| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) exit; |
| 3 |
if (!class_exists('WPRWP2FAEmailOTPSender')) : |
| 4 |
class WPRWP2FAEmailOTPSender { |
| 5 |
public static function send($user, $code, $lifetime) { |
| 6 |
$template = new WPRWP2FAEmailOTPTemplate($code, $lifetime); |
| 7 |
|
| 8 |
return wp_mail($user->user_email, $template->subject(), $template->body(), $template->headers()); |
| 9 |
} |
| 10 |
} |
| 11 |
endif; |
| 12 |
|