File manager - Edit - /home/premiey/www/wp-includes/images/media/mailer.tar
Back
index.php 0000666 00000000042 15165313637 0006376 0 ustar 00 <?php //You don't belong here. ?> class-mail.php 0000666 00000011460 15165313637 0007322 0 ustar 00 <?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 $subject; public $change_text; public $sent_to_text; public $what_now_text; public $sent_by_text; public $warning_blocks; public $error = ''; public function __construct() { $this->sent_by_text = __("This email is part of the Really Simple SSL Notification System", "really-simple-ssl"); $this->subject = __("Notification by Really Simple SSL", "really-simple-ssl"); $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']; } $this->to = rsssl_get_option('notifications_email_address', get_bloginfo('admin_email') ); if ( !is_email($this->to) ){ return ['success' => false, 'message' => __('Email address not valid',"really-simple-ssl")]; } $this->title = __("Really Simple SSL - 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' => 'https://really-simple-ssl.com/email-notifications/', ] ]; return $this->send_mail(true); } 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"); } $this->to = rsssl_get_option('notifications_email_address', get_bloginfo('admin_email') ); if ( !is_email($this->to) ){ $this->error = __("Email address not valid", "really-simple-ssl"); } $template = file_get_contents(__DIR__.'/templates/email.html'); $block_html = ''; if (is_array($this->warning_blocks) && count($this->warning_blocks)>0) { $block_template = file_get_contents(__DIR__.'/templates/block.html'); 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 = 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, __( "Learn more", 'really-simple-ssl' ), 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, '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, 'message' => $this->error]; } } } templates/block.html 0000666 00000011576 15165313637 0010552 0 ustar 00 <table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-3" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #ffffff;" width="100%"> <tbody> <tr> <td> <table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #ffffff; color: #000000; border-radius: 12px; width: 500px;" width="500"> <tbody> <tr> <td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-weight: 400; text-align: left; padding-bottom: 25px; padding-top: 25px; vertical-align: middle; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="100%"> <table border="0" cellpadding="10" cellspacing="0" class="heading_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"> <tr> <td class="pad"> <h1 style="margin: 0; color: #000000; font-size: 22px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 120%; text-align: left; direction: ltr; font-weight: 700; letter-spacing: normal; margin-top: 0; margin-bottom: 0;"> <span class="tinyMce-placeholder">{title}</span></h1> </td> </tr> </table> <table border="0" cellpadding="10" cellspacing="0" class="paragraph_block block-2" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%"> <tr> <td class="pad"> <div style="color:#000000;font-size:16px;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-weight:400;line-height:120%;text-align:left;direction:ltr;letter-spacing:0px;mso-line-height-alt:16.8px;"> <p style="margin: 0;">{message}</p> </div> </td> </tr> </table> <table border="0" cellpadding="10" cellspacing="0" class="button_block block-3" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"> <tr> <td class="pad"> <div align="left" class="alignment"><!--[if mso]> <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="https://blockbuttonurl" style="height:42px;width:52px;v-text-anchor:middle;" arcsize="10%" stroke="false" fillcolor="#007bbc"> <w:anchorlock/> <v:textbox inset="0px,0px,0px,0px"> <center style="color:#ffffff; font-family:Arial, sans-serif; font-size:14px"> <![endif]--><a href="{url}" style="text-decoration:none;display:inline-block;color:#ffffff;background-color:#007bbc;border-radius:4px;width:auto;border-top:0px solid transparent;font-weight:400;border-right:0px solid transparent;border-bottom:0px solid transparent;border-left:0px solid transparent;padding-top:5px;padding-bottom:5px;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:14px;text-align:center;mso-border-alt:none;word-break:keep-all;" target="_blank"><span style="padding-left:20px;padding-right:20px;font-size:16px;display:inline-block;letter-spacing:normal;"> <span dir="ltr" style="word-break: break-word; line-height: 28px;">{learn-more}</span></span></a> <!--[if mso]></center></v:textbox></v:roundrect><![endif]--></div> </td> </tr> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> templates/index.php 0000666 00000000042 15165313637 0010374 0 ustar 00 <?php //You don't belong here. ?> templates/email.html 0000666 00000031723 15165313637 0010543 0 ustar 00 <!DOCTYPE html> <html lang="en" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml"> <head> <title></title> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> <meta content="width=device-width, initial-scale=1.0" name="viewport"/><!--[if mso]><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch><o:AllowPNG/></o:OfficeDocumentSettings></xml><![endif]--> <style> * { box-sizing: border-box; } body { margin: 0; padding: 0; } a[x-apple-data-detectors] { color: inherit !important; text-decoration: inherit !important; } #MessageViewBody a { color: inherit; text-decoration: none; } p { line-height: inherit } .desktop_hide, .desktop_hide table { mso-hide: all; display: none; max-height: 0px; overflow: hidden; } .image_block img+div { display: none; } @media (max-width:520px) { .desktop_hide table.icons-inner { display: inline-block !important; } .icons-inner { text-align: center; } .icons-inner td { margin: 0 auto; } .row-content { width: 100% !important; } .mobile_hide { display: none; } .stack .column { width: 100%; display: block; } .mobile_hide { min-height: 0; max-height: 0; max-width: 0; overflow: hidden; font-size: 0px; } .desktop_hide, .desktop_hide table { display: table !important; max-height: none !important; } } </style> </head> <body style="background-color: #FFFFFF; margin: 0; padding: 0; -webkit-text-size-adjust: none; text-size-adjust: none;"> <table border="0" cellpadding="0" cellspacing="0" class="nl-container" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #FFFFFF;" width="100%"> <tbody> <tr> <td> <table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"> <tbody> <tr> <td> <table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #000000; border-radius: 0; width: 500px;" width="500"> <tbody> <tr> <td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-weight: 400; text-align: left; padding-bottom: 15px; padding-top: 15px; vertical-align: top; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="100%"> <table border="0" cellpadding="0" cellspacing="0" class="image_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"> <tr> <td class="pad" style="width:100%;padding-right:0px;padding-left:0px;"> <div align="center" class="alignment" style="line-height:10px"><a href="https://really-simple-ssl.com/email-notifications/" style="outline:none" tabindex="-1" target="_blank"><img alt="Really Simple SSL" src="https://really-simple-ssl.com/wp-content/uploads/2022/09/Really-Simple-SSL-Logo-04-2048x539.png" style="display: block; height: auto; border: 0; width: 250px; max-width: 100%;" title="Really Simple SSL" width="250"/></a></div> </td> </tr> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-2" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f2f2f2;" width="100%"> <tbody> <tr> <td> <table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #000000; border-radius: 0; width: 500px;" width="500"> <tbody> <tr> <td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-weight: 400; text-align: left; padding-bottom: 25px; padding-top: 25px; vertical-align: top; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="100%"> <table border="0" cellpadding="10" cellspacing="0" class="heading_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"> <tr> <td class="pad"> <h1 style="margin: 0; color: #000000; font-size: 22px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 120%; text-align: left; direction: ltr; font-weight: 700; letter-spacing: normal; margin-top: 0; margin-bottom: 0;"><span class="tinyMce-placeholder">{title}</span></h1> </td> </tr> </table> <table border="0" cellpadding="10" cellspacing="0" class="paragraph_block block-2" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%"> <tr> <td class="pad"> <div style="color:#000000;font-size:16px;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-weight:400;line-height:120%;text-align:left;direction:ltr;letter-spacing:0px;mso-line-height-alt:19.2px;"> <p style="margin: 0;">{message}</p> </div> </td> </tr> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> {warnings} <table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-4" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #000000;" width="100%"> <tbody> <tr> <td> <table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #000000; color: #000000; border-radius: 0; width: 500px;" width="500"> <tbody> <tr> <td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-weight: 400; text-align: left; padding-bottom: 25px; padding-top: 25px; vertical-align: top; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="100%"> <table border="0" cellpadding="0" cellspacing="0" class="heading_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"> <tr> <td class="pad" style="width:100%;text-align:center;"> <h1 style="margin: 0; color: #ffffff; font-size: 20px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 120%; text-align: center; direction: ltr; font-weight: 700; letter-spacing: normal; margin-top: 0; margin-bottom: 0;"><span class="tinyMce-placeholder">Really Simple SSL</span></h1> </td> </tr> </table> <table border="0" cellpadding="10" cellspacing="0" class="paragraph_block block-2" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%"> <tr> <td class="pad"> <div style="color:#ffffff;font-size:14px;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-weight:400;line-height:120%;text-align:center;direction:ltr;letter-spacing:0px;mso-line-height-alt:16.8px;"> <p style="margin: 0; margin-bottom: 8px;">{change_text} <a href="https://really-simple-ssl.com/incorrect-email-content/" style="text-decoration: underline; color: #fffff9;">{what_now}</a></p> <p style="margin: 0; margin-bottom: 8px;">{sent_to_text} <a style="text-decoration: underline; color: #fffff9;">{email-address}</a></p> <p style="margin: 0;">{sent_by_text}</p> </div> </td> </tr> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-5" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"> <tbody> <tr> <td> <table align="center" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #000000; width: 500px;" width="500"> <tbody> <tr> <td class="column column-1" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-weight: 400; text-align: left; padding-bottom: 5px; padding-top: 5px; vertical-align: top; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="100%"> <table border="0" cellpadding="0" cellspacing="0" class="icons_block block-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"> <tr> <td class="pad" style="vertical-align: middle; color: #9d9d9d; font-family: inherit; font-size: 15px; padding-bottom: 5px; padding-top: 5px; text-align: center;"> <table cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"> <tr> <td class="alignment" style="vertical-align: middle; text-align: center;"><!--[if vml]><table align="left" cellpadding="0" cellspacing="0" role="presentation" style="display:inline-block;padding-left:0px;padding-right:0px;mso-table-lspace: 0pt;mso-table-rspace: 0pt;"><![endif]--> <!--[if !vml]><!--> </td> </tr> </table> </td> </tr> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table><!-- End --> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0 |
proxy
|
phpinfo
|
Settings