PK E:FZ�6��� � mailer/class-mail-admin.phpnu �[��� <?php
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Class to send an e-mail
*/
if ( !class_exists('rsssl_mailer_admin') ) {
class rsssl_mailer_admin {
public function __construct() {
add_filter( 'rsssl_five_minutes_cron', array( $this, 'maybe_send_mail' ) );
add_filter( 'rsssl_five_minutes_cron', array( $this, 'rsssl_clear_expired_tokens' ) );
add_action( 'admin_init', array( $this, 'maybe_verify_user_email' ) );
add_action( 'rsssl_after_save_field', array( $this, 'maybe_allow_restart_email_verification' ), 10, 4 );
}
/**
* @return void
*
* Clear expired verification tokens from DB
*/
public function rsssl_clear_expired_tokens() {
$token_expiration = get_option( 'rsssl_email_verification_code_expiration' );
if ( $token_expiration > time() ) {
delete_option( 'rsssl_email_verification_code' );
delete_option( 'rsssl_email_verification_code_expiration' );
}
}
/**
* @return void
*
* Verify user e-mail
*/
public function maybe_verify_user_email() {
if ( ! rsssl_user_can_manage() ) {
return;
}
if ( isset($_GET['rsssl_force_verification'] ) ){
update_option( 'rsssl_email_verification_status', 'completed', false );
}
if ( ! isset( $_GET['rsssl_verification_code'] ) ) {
return;
}
// Handle e-mail verification
$verification_code = $_GET['rsssl_verification_code'];
$verification_code = preg_replace( "/[^0-9]/", "", $verification_code );
$verification_code = substr( $verification_code, 0, 6 );
// verify code
$user_id = get_current_user_id();
$nonce = $_GET['rsssl_nonce'];
if ( ! wp_verify_nonce( $nonce, 'rsssl_email_verification_' . $user_id ) ) {
return;
}
$current_time = time();
$saved_verification_code = get_option('rsssl_email_verification_code');
$saved_verification_expiration = get_option('rsssl_email_verification_code_expiration');
if ( $verification_code === $saved_verification_code && $saved_verification_expiration && $current_time < $saved_verification_expiration ) {
// If the verification code is correct and hasn't expired, update the verification status
update_option( 'rsssl_email_verification_status', 'completed', false );
set_transient('rsssl_redirect_to_settings_page', true, HOUR_IN_SECONDS );
}
}
/**
* @return void
*/
public function maybe_send_mail() {
if ( ! rsssl_get_option( 'send_notifications_email' ) ) {
return;
}
$fields = get_option( 'rsssl_email_warning_fields', [] );
$time_saved = get_option( 'rsssl_email_warning_fields_saved' );
if ( ! $time_saved ) {
return;
}
$thirty_minutes_ago = $time_saved < strtotime( "-10 minutes" );
$warning_blocks = array_column( $fields, 'email' );
if ( $thirty_minutes_ago && count( $warning_blocks ) > 0 ) {
//clear the option
delete_option( 'rsssl_email_warning_fields', [] );
delete_option( 'rsssl_email_warning_fields_saved' );
$mailer = new rsssl_mailer();
$mailer->warning_blocks = $warning_blocks;
$mailer->send_mail();
}
}
/**
* @return bool|void
*
* E-mail verification status callback
*/
public function email_verification_completed() {
$status = get_option( 'rsssl_email_verification_status' );
if ( $status === 'started' ) {
return false;
}
if ( $status === 'completed' ) {
return true;
}
if ( $status === 'email_changed' ) {
return false;
}
}
/**
* @param $field_id
* @param $field_value
* @param $prev_value
* @param $field_type
*
* @return void
*
* Maybe allow the user to re-verify their e-mail address after the notifications e-mail address has changed
*/
public function maybe_allow_restart_email_verification( $field_id, $field_value, $prev_value, $field_type ) {
if ( $field_id === 'notifications_email_address' && $field_value !== $prev_value && rsssl_user_can_manage() ) {
update_option( 'rsssl_email_verification_status', 'email_changed' );
}
}
}
}PK E:FZ?t4s# # mailer/index.phpnu �[��� <?php // You don't belong here. ?>
PK E:FZ?t4s# # mailer/templates/index.phpnu �[��� <?php // You don't belong here. ?>
PK E:FZ_���( ( mailer/templates/block.htmlnu �[��� <div class="u-row-container" style="padding: 20px;background-color: #f2f2f2">
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 20px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:500px;"><tr style="background-color: transparent;"><![endif]-->
<!--[if (mso)|(IE)]><td align="center" width="500" style="background-color: #ffffff;width: 500px;padding: 20px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;" valign="top"><![endif]-->
<div class="u-col u-col-100" style="max-width: 320px;min-width: 500px;display: table-cell;vertical-align: top;">
<div style="background-color: #ffffff;height: 100%;width: 100% !important;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;">
<!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 20px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;"><!--<![endif]-->
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<h2 style="margin: 0px; line-height: 140%; text-align: left; word-wrap: break-word; font-size: 22px; font-weight: 400;">{title}</h2>
</td>
</tr>
</tbody>
</table>
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<div style="font-size: 14px; line-height: 140%; text-align: left; word-wrap: break-word;">
<p style="line-height: 140%;">{message}</p>
</div>
</td>
</tr>
</tbody>
</table>
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<!--[if mso]><style>.v-button {background: transparent !important;}</style><![endif]-->
<div align="left">
<!--[if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="" style="height:37px; v-text-anchor:middle; width:117px;" arcsize="11%" stroke="f" fillcolor="#007bbc"><w:anchorlock/><center style="color:#FFFFFF;"><![endif]-->
<a href="{url}" target="_blank" rel="noopener noreferrer" class="v-button" style="box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #FFFFFF; background-color: #007bbc; border-radius: 4px;-webkit-border-radius: 4px; -moz-border-radius: 4px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;font-size: 14px;">
<span style="display:block;padding:10px 20px;line-height:120%;"><span style="line-height: 16.8px;">{learn-more}</span></span>
</a>
<!--[if mso]></center></v:roundrect><![endif]-->
</div>
</td>
</tr>
</tbody>
</table>
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td><![endif]-->
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
PK E:FZ#5KI�) �) mailer/templates/email.htmlnu �[��� <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="x-apple-disable-message-reformatting">
<!--[if !mso]><!--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]-->
<title></title>
<style type="text/css">
@media only screen and (min-width: 520px) {
.u-row {
width: 500px !important;
}
.u-row .u-col {
vertical-align: top;
}
.u-row .u-col-100 {
width: 500px !important;
}
}
@media (max-width: 520px) {
.u-row-container {
max-width: 100% !important;
padding-left: 0px !important;
padding-right: 0px !important;
}
.u-row .u-col {
min-width: 320px !important;
max-width: 100% !important;
display: block !important;
}
.u-row {
width: 100% !important;
}
.u-col {
width: 100% !important;
}
.u-col > div {
margin: 0 auto;
}
}
body {
margin: 0;
padding: 0;
}
table,
tr,
td {
vertical-align: top;
border-collapse: collapse;
}
p {
margin: 0;
}
.ie-container table,
.mso-container table {
table-layout: fixed;
}
* {
line-height: inherit;
}
a[x-apple-data-detectors='true'] {
color: inherit !important;
text-decoration: none !important;
}
table, td { color: #000000; } #u_body_footer a { color: #fff; text-decoration: underline; }
</style>
</head>
<body class="clean-body u_body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #e7e7e7;color: #000000">
<!--[if IE]><div class="ie-container"><![endif]-->
<!--[if mso]><div class="mso-container"><![endif]-->
<table id="u_body" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #e7e7e7;width:100%" cellpadding="0" cellspacing="0">
<tbody>
<tr style="vertical-align: top">
<td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #e7e7e7;"><![endif]-->
<div class="u-row-container" style="padding: 0px;background-color: #ffffff">
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: #ffffff;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:500px;"><tr style="background-color: transparent;"><![endif]-->
<!--[if (mso)|(IE)]><td align="center" width="500" style="width: 500px;padding: 5px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]-->
<div class="u-col u-col-100" style="max-width: 320px;min-width: 500px;display: table-cell;vertical-align: top;">
<div style="height: 100%;width: 100% !important;">
<!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 5px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"><!--<![endif]-->
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="padding-right: 0px;padding-left: 0px;" align="center">
<img align="center" border="0" src="https://downloads.really-simple-security.com/images/reallysimplesecurity.png" alt="Really Simple Plugins" title="Really Simple Plugins" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 45%;max-width: 216px;" width="216"/>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td><![endif]-->
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
<div class="u-row-container" style="padding: 0px;background-color: #f2f2f2">
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:500px;"><tr style="background-color: transparent;"><![endif]-->
<!--[if (mso)|(IE)]><td align="center" width="500" style="width: 500px;padding: 20px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;" valign="top"><![endif]-->
<div class="u-col u-col-100" style="max-width: 320px;min-width: 500px;display: table-cell;vertical-align: top;">
<div style="height: 100%;width: 100% !important;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;">
<!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 20px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;"><!--<![endif]-->
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<h1 style="margin: 0px; line-height: 140%; text-align: left; word-wrap: break-word; font-size: 20px; font-weight: 500;">{title}</h1>
</td>
</tr>
</tbody>
</table>
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<div style="font-size: 14px; line-height: 140%; text-align: left; word-wrap: break-word;">
<p style="line-height: 140%;">{message}</p>
</div>
</td>
</tr>
</tbody>
</table>
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td><![endif]-->
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
{warnings}
<div class="u-row-container" style="padding: 0px;background-color: #333333">
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: #333333;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:500px;"><tr style="background-color: transparent;"><![endif]-->
<!--[if (mso)|(IE)]><td align="center" width="500" style="background-color: #333333;width: 500px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;" valign="top"><![endif]-->
<div class="u-col u-col-100" style="max-width: 320px;min-width: 500px;display: table-cell;vertical-align: top;">
<div style="background-color: #333333;height: 100%;width: 100% !important;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;">
<!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;"><!--<![endif]-->
<table id="u_body_footer" style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:20px;font-family:arial,helvetica,sans-serif;" align="left">
<div style="font-size: 12px; color: #ffffff; line-height: 140%; text-align: center; word-wrap: break-word;">
<p style="line-height: 140%; font-size: 14px;font-weight:600;margin-bottom: 6px;">Really Simple Security<br />
<p style="margin: 0; margin-bottom: 3px;">{change_text} <a href="https://really-simple-ssl.com/incorrect-email-content/" style="text-decoration: underline; color: #fffff9!important;">{what_now}</a></p>
<p style="margin: 0; margin-bottom: 3px;">{sent_to_text} <a style="text-decoration: underline; color: #fffff9!important;">{email-address}</a></p>
<p style="margin: 0;">{sent_by_text}</p>
</div>
</td>
</tr>
</tbody>
</table>
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td><![endif]-->
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
<!--[if mso]></div><![endif]-->
<!--[if IE]></div><![endif]-->
</body>
</html>
PK E:FZ@ZS�( �( % mailer/templates/email-unbranded.htmlnu �[��� <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="x-apple-disable-message-reformatting">
<!--[if !mso]><!--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]-->
<title></title>
<style type="text/css">
@media only screen and (min-width: 520px) {
.u-row {
width: 500px !important;
}
.u-row .u-col {
vertical-align: top;
}
.u-row .u-col-100 {
width: 500px !important;
}
}
@media (max-width: 520px) {
.u-row-container {
max-width: 100% !important;
padding-left: 0px !important;
padding-right: 0px !important;
}
.u-row .u-col {
min-width: 320px !important;
max-width: 100% !important;
display: block !important;
}
.u-row {
width: 100% !important;
}
.u-col {
width: 100% !important;
}
.u-col > div {
margin: 0 auto;
}
}
body {
margin: 0;
padding: 0;
}
table,
tr,
td {
vertical-align: top;
border-collapse: collapse;
}
p {
margin: 0;
}
.ie-container table,
.mso-container table {
table-layout: fixed;
}
* {
line-height: inherit;
}
a[x-apple-data-detectors='true'] {
color: inherit !important;
text-decoration: none !important;
}
table, td { color: #000000; } #u_body_footer a { color: #fff; text-decoration: underline; }
</style>
</head>
<body class="clean-body u_body" style="margin: 0;padding: 0;-webkit-text-size-adjust: 100%;background-color: #e7e7e7;color: #000000">
<!--[if IE]><div class="ie-container"><![endif]-->
<!--[if mso]><div class="mso-container"><![endif]-->
<table id="u_body" style="border-collapse: collapse;table-layout: fixed;border-spacing: 0;mso-table-lspace: 0pt;mso-table-rspace: 0pt;vertical-align: top;min-width: 320px;Margin: 0 auto;background-color: #e7e7e7;width:100%" cellpadding="0" cellspacing="0">
<tbody>
<tr style="vertical-align: top">
<td style="word-break: break-word;border-collapse: collapse !important;vertical-align: top">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color: #e7e7e7;"><![endif]-->
<div class="u-row-container" style="padding: 0px;background-color: #ffffff">
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: #ffffff;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:500px;"><tr style="background-color: transparent;"><![endif]-->
<!--[if (mso)|(IE)]><td align="center" width="500" style="width: 500px;padding: 5px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;" valign="top"><![endif]-->
<div class="u-col u-col-100" style="max-width: 320px;min-width: 500px;display: table-cell;vertical-align: top;">
<div style="height: 100%;width: 100% !important;">
<!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 5px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;"><!--<![endif]-->
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="padding-right: 0px;padding-left: 0px;" align="center">
<img align="center" border="0" src="https://downloads.really-simple-security.com/images/security.png" alt="Site Security" title="Site Security" style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;clear: both;display: inline-block !important;border: none;height: auto;float: none;width: 30%;max-width: 64px;"
width="96"/>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td><![endif]-->
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
<div class="u-row-container" style="padding: 0px;background-color: #f2f2f2">
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:500px;"><tr style="background-color: transparent;"><![endif]-->
<!--[if (mso)|(IE)]><td align="center" width="500" style="width: 500px;padding: 20px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;" valign="top"><![endif]-->
<div class="u-col u-col-100" style="max-width: 320px;min-width: 500px;display: table-cell;vertical-align: top;">
<div style="height: 100%;width: 100% !important;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;">
<!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 20px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;"><!--<![endif]-->
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<h1 style="margin: 0px; line-height: 140%; text-align: left; word-wrap: break-word; font-size: 20px; font-weight: 500;">{title}</h1>
</td>
</tr>
</tbody>
</table>
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<div style="font-size: 14px; line-height: 140%; text-align: left; word-wrap: break-word;">
<p style="line-height: 140%;">{message}</p>
</div>
</td>
</tr>
</tbody>
</table>
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td><![endif]-->
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
{warnings}
<div class="u-row-container" style="padding: 0px;background-color: #333333">
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 0px;background-color: #333333;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:500px;"><tr style="background-color: transparent;"><![endif]-->
<!--[if (mso)|(IE)]><td align="center" width="500" style="background-color: #333333;width: 500px;padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;" valign="top"><![endif]-->
<div class="u-col u-col-100" style="max-width: 320px;min-width: 500px;display: table-cell;vertical-align: top;">
<div style="background-color: #333333;height: 100%;width: 100% !important;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;">
<!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 0px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;"><!--<![endif]-->
<table id="u_body_footer" style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:20px;font-family:arial,helvetica,sans-serif;" align="left">
<div style="font-size: 12px; color: #ffffff; line-height: 140%; text-align: center; word-wrap: break-word;">
<p style="margin: 0; margin-bottom: 3px;">{sent_to_text} <a style="text-decoration: underline; color: #fff!important;">{email-address}</a></p>
<p style="margin: 0;">{sent_by_text}</p>
</div>
</td>
</tr>
</tbody>
</table>
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td><![endif]-->
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
<!--[if (mso)|(IE)]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
<!--[if mso]></div><![endif]-->
<!--[if IE]></div><![endif]-->
</body>
</html>
PK E:FZ_���( ( % mailer/templates/block-unbranded.htmlnu �[��� <div class="u-row-container" style="padding: 20px;background-color: #f2f2f2">
<div class="u-row" style="margin: 0 auto;min-width: 320px;max-width: 500px;overflow-wrap: break-word;word-wrap: break-word;word-break: break-word;background-color: transparent;">
<div style="border-collapse: collapse;display: table;width: 100%;height: 100%;background-color: transparent;">
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding: 20px;background-color: transparent;" align="center"><table cellpadding="0" cellspacing="0" border="0" style="width:500px;"><tr style="background-color: transparent;"><![endif]-->
<!--[if (mso)|(IE)]><td align="center" width="500" style="background-color: #ffffff;width: 500px;padding: 20px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;" valign="top"><![endif]-->
<div class="u-col u-col-100" style="max-width: 320px;min-width: 500px;display: table-cell;vertical-align: top;">
<div style="background-color: #ffffff;height: 100%;width: 100% !important;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;">
<!--[if (!mso)&(!IE)]><!--><div style="box-sizing: border-box; height: 100%; padding: 20px;border-top: 0px solid transparent;border-left: 0px solid transparent;border-right: 0px solid transparent;border-bottom: 0px solid transparent;border-radius: 0px;-webkit-border-radius: 0px; -moz-border-radius: 0px;"><!--<![endif]-->
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<h2 style="margin: 0px; line-height: 140%; text-align: left; word-wrap: break-word; font-size: 22px; font-weight: 400;">{title}</h2>
</td>
</tr>
</tbody>
</table>
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<div style="font-size: 14px; line-height: 140%; text-align: left; word-wrap: break-word;">
<p style="line-height: 140%;">{message}</p>
</div>
</td>
</tr>
</tbody>
</table>
<table style="font-family:arial,helvetica,sans-serif;" role="presentation" cellpadding="0" cellspacing="0" width="100%" border="0">
<tbody>
<tr>
<td style="overflow-wrap:break-word;word-break:break-word;padding:10px;font-family:arial,helvetica,sans-serif;" align="left">
<!--[if mso]><style>.v-button {background: transparent !important;}</style><![endif]-->
<div align="left">
<!--[if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="" style="height:37px; v-text-anchor:middle; width:117px;" arcsize="11%" stroke="f" fillcolor="#007bbc"><w:anchorlock/><center style="color:#FFFFFF;"><![endif]-->
<a href="{url}" target="_blank" rel="noopener noreferrer" class="v-button" style="box-sizing: border-box;display: inline-block;text-decoration: none;-webkit-text-size-adjust: none;text-align: center;color: #FFFFFF; background-color: #007bbc; border-radius: 4px;-webkit-border-radius: 4px; -moz-border-radius: 4px; width:auto; max-width:100%; overflow-wrap: break-word; word-break: break-word; word-wrap:break-word; mso-border-alt: none;font-size: 14px;">
<span style="display:block;padding:10px 20px;line-height:120%;"><span style="line-height: 16.8px;">{learn-more}</span></span>
</a>
<!--[if mso]></center></v:roundrect><![endif]-->
</div>
</td>
</tr>
</tbody>
</table>
<!--[if (!mso)&(!IE)]><!--></div><!--<![endif]-->
</div>
</div>
<!--[if (mso)|(IE)]></td><![endif]-->
<!--[if (mso)|(IE)]></tr></table></td></tr></table><![endif]-->
</div>
</div>
</div>
PK E:FZ�D�� � mailer/class-mail.phpnu �[��� <?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class to send an e-mail
*/
if ( ! class_exists( 'rsssl_mailer' ) ) {
class rsssl_mailer {
public $to;
public $title;
public $headers;
public $message;
public $branded = true;
public $subject;
public $button_text;
public $change_text;
public $sent_to_text;
public $what_now_text;
public $sent_by_text;
public $warning_blocks;
public $error = '';
public $template_filename;
public $block_template_filename;
public function __construct() {
$this->sent_by_text = __( "This email is part of the Really Simple Security Notification System", "really-simple-ssl" );
$this->subject = __( "Notification by Really Simple Security", "really-simple-ssl" );
$this->button_text = __( "Learn more", "really-simple-ssl" );
$this->to = rsssl_get_option( 'notifications_email_address', get_bloginfo( 'admin_email' ) );
$this->title = __( "Learn more about our features!", "really-simple-ssl" );
$this->sent_to_text = __( "This email was sent to", "really-simple-ssl" );
$this->what_now_text = __( "Learn more", "really-simple-ssl" );
$this->change_text = __( "Why did I receive this email?", "really-simple-ssl" );
$domain = '<a href="' . site_url() . '">' . site_url() . '</a>';
$this->message = sprintf( __( "You have enabled a feature on %s. We think it's important to let you know a little bit more about this feature so you can use it without worries.", "really-simple-ssl" ), $domain );
add_action( 'wp_mail_failed', array( $this, 'log_mailer_errors' ), 10, 1 );
}
/**
* Send a test email
* @return array
*/
public function send_test_mail() {
if ( ! rsssl_user_can_manage() ) {
return [ 'success' => false, 'message' => 'Not allowed' ];
}
if ( ! is_email( $this->to ) ) {
return [
'success' => false,
'title' => __( "Test notification email error", 'really-simple-ssl' ),
'message' => __( 'Email address not valid', "really-simple-ssl" ),
];
}
$this->title = __( "Really Simple Security - Notification Test", "really-simple-ssl" );
$this->message = __( "This email is confirmation that any security notices are likely to reach your inbox.", "really-simple-ssl" );
$this->warning_blocks = [
[
'title' => __( "About notifications", "really-simple-ssl" ),
'message' => __( "Email notifications are only sent for important updates, security notices or when certain features are enabled.", "really-simple-ssl" ),
'url' => rsssl_link('email-notifications/'),
]
];
return $this->send_mail( true );
}
public function send_verification_mail() {
if ( ! rsssl_user_can_manage() ) {
return [
'success' => false,
'message' => 'Not allowed',
'title' => __( "Email verification error", 'really-simple-ssl' ),
];
}
$verification_code = str_pad( rand( 0, 999999 ), 6, '0', STR_PAD_LEFT );
$verification_expiration = strtotime( "+15 minutes" );
// Delete existing option
delete_option( 'rsssl_email_verification_code' );
update_option( 'rsssl_email_verification_code', $verification_code, false );
update_option( 'rsssl_email_verification_code_expiration', $verification_expiration, false );
update_option( 'rsssl_email_verification_status', 'started', false );
if ( ! is_email( $this->to ) ) {
return [
'success' => false,
'title' => __( "Email verification error", 'really-simple-ssl' ),
'message' => __( 'Email address not valid', "really-simple-ssl" )
];
}
$user_id = get_current_user_id();
$verification_url = add_query_arg(
array(
'page' => 'really-simple-security',
'rsssl_nonce' => wp_create_nonce( 'rsssl_email_verification_' . $user_id ),
'rsssl_verification_code' => $verification_code,
),
rsssl_admin_url([], '#settings/general')
);
$this->subject = __( "Really Simple Security - Verify your email address", "really-simple-ssl" );
$this->title = __( "Please verify your email", "really-simple-ssl" );
$this->message = __('To use certain features in Really Simple Security we need to confirm emails are delivered without issues.', 'really-simple-ssl');
$this->button_text = __( "Verify email", "really-simple-ssl" );
$this->warning_blocks[] = [
'title' => '',
'message' => sprintf( __( "Click the button below to confirm your email address, or copy the following URL: %s", "really-simple-ssl" ), '{url}' ),
'url' => $verification_url,
];
return $this->send_mail();
}
public function log_mailer_errors( $wp_error ) {
if ( is_wp_error( $wp_error ) ) {
$this->error = $wp_error->get_error_message();
}
}
/**
* Send an e-mail with the correct login URL
*
* @return array
*/
public function send_mail(): array {
if ( empty( $this->message ) || empty( $this->subject ) ) {
$this->error = __( "Email could not be sent. No message or subject set.", "really-simple-ssl" );
}
if ( ! is_email( $this->to ) ) {
$this->error = __( "Email address not valid", "really-simple-ssl" );
}
$block_template = $this->branded ? rsssl_path . '/mailer/templates/block.html' : rsssl_path . '/mailer/templates/block-unbranded.html';
$email_template = $this->branded ? rsssl_path . '/mailer/templates/email.html' : rsssl_path . '/mailer/templates/email-unbranded.html';
$this->block_template_filename = apply_filters( 'rsssl_email_block_template', $block_template );
$this->template_filename = apply_filters( 'rsssl_email_template', $email_template );
$template = file_get_contents( $this->template_filename );
$block_html = '';
if ( is_array( $this->warning_blocks ) && count( $this->warning_blocks ) > 0 ) {
$block_template = file_get_contents( $this->block_template_filename );
foreach ( $this->warning_blocks as $warning_block ) {
$block_html .= str_replace(
[ '{title}', '{message}', '{url}' ],
[
sanitize_text_field( $warning_block['title'] ),
wp_kses_post( $warning_block['message'] ),
esc_url_raw( $warning_block['url'] )
],
$block_template );
}
}
$username = rsssl_get_option( 'new_admin_user_login' );
$login_url = ! empty( rsssl_get_option( 'change_login_url' ) )
? trailingslashit( site_url() ) . rsssl_get_option( 'change_login_url' )
: wp_login_url();
$body = str_replace(
[
'{title}',
'{message}',
'{warnings}',
'{email-address}',
'{learn-more}',
'{site_url}',
'{login_url}',
'{username}',
'{change_text}',
'{what_now}',
'{sent_to_text}',
'{sent_by_text}',
],
[
sanitize_text_field( $this->title ),
wp_kses_post( $this->message ),
$block_html,
$this->to,
$this->button_text,
site_url(),
$login_url,
$username,
$this->change_text,
$this->what_now_text,
$this->sent_to_text,
$this->sent_by_text,
], $template );
$success = wp_mail( $this->to, sanitize_text_field( $this->subject ), $body, array( 'Content-Type: text/html; charset=UTF-8' ) );
if ( $success ) {
return [
'success' => true,
'title' => __( "Email verification", 'really-simple-ssl' ),
'message' => __( 'Email sent! Please check your mail', "really-simple-ssl" )
];
}
if ( empty( $this->error ) ) {
$this->error = __( 'Email could not be sent.', "really-simple-ssl" );
} else {
$this->error = __( 'An error occurred:', "really-simple-ssl" ) . '<br>' . $this->error;
}
return [
'success' => false,
'title' => __( "Email notification error", 'really-simple-ssl' ),
'message' => $this->error
];
}
}
}
PK E:FZ�WVgE&