Plugin Directory

Changeset 2352126


Ignore:
Timestamp:
08/04/2020 04:53:08 AM (5 years ago)
Author:
MMDeveloper
Message:

Removed lib.

Location:
search-my-theme
Files:
13 added
3 edited

Legend:

Unmodified
Added
Removed
  • search-my-theme/trunk/lib/tom-m8te.php

    r1328677r2352126 
    228228          }
    229229        }   
    230       }
    231     }
    232 
    233 
    234     // Allows you to send an email.
    235     function send_email($is_html, $to_emails, $to_cc_emails, $to_bcc_emails, $from_email, $from_name, $subject, $body, $alt_body = "", $attachments = array(), $smtp_auth = false, $smtp_mail_host = "", $smtp_mail_port = "", $smtp_mail_username = "", $smtp_mail_password = "", $secure_array = array()) {
    236 
    237       $mail  = new PHPMailer();
    238       // defaults to using php "mail()"
    239       $body  = preg_replace("/[\"]/","",$body);
    240       if (!is_array($to_emails)) {
    241         $to_emails = explode(",", $to_emails);
    242       }
    243       foreach ($to_emails as $key => $value) {
    244         if (is_integer($key)) {
    245           $mail->AddAddress(str_replace(" ", "",$value), "");
    246         } else {
    247           $mail->AddAddress(str_replace(" ", "",$key), $value);
    248         }
    249       }
    250 
    251       if (!is_array($to_cc_emails)) {
    252         $to_cc_emails = explode(",", $to_cc_emails);
    253       }
    254       foreach ($to_cc_emails as $key => $value) {
    255         if (is_integer($key)) {
    256           $mail->AddCC(str_replace(" ", "",$value), "");
    257         } else {
    258           $mail->AddCC(str_replace(" ", "",$key), $value);
    259         }
    260       }
    261 
    262       if (!is_array($to_bcc_emails)) {
    263         $to_bcc_emails = explode(",", $to_bcc_emails);
    264       }
    265       foreach ($to_bcc_emails as $key => $value) {
    266         if (is_integer($key)) {
    267           $mail->AddBCC(str_replace(" ", "",$value), "");
    268         } else {
    269           $mail->AddBCC(str_replace(" ", "",$key), $value);
    270         }
    271       }
    272 
    273       $mail->SetFrom($from_email, $from_name);
    274       $mail->Subject  = $subject;
    275 
    276       if ($is_html) {
    277         $body = preg_replace("/<script(.+)*<\/script>/", "", $body);
    278       } else {
    279         $body = esc_html($body);
    280       }
    281      
    282       $alt_body = esc_html($alt_body);
    283 
    284       $body = str_replace("&#039;", "'", $body);
    285       $body = str_replace("&#34;", '"', $body);
    286       $body = str_replace("&amp;", '&', $body);
    287       $body = str_replace("&#38;", '&', $body);
    288       $alt_body = str_replace("&#039;", "'", $alt_body);
    289       $alt_body = str_replace("&#34;", '"', $alt_body);
    290       $alt_body = str_replace("&amp;", '&', $alt_body);
    291       $alt_body = str_replace("&#38;", '&', $alt_body);
    292 
    293       if ($is_html) {
    294         $mail->MsgHTML($body);
    295       } else {
    296         $mail->Body = $body;
    297       }
    298 
    299       if ($alt_body != "") {
    300         $mail->AltBody = $alt_body;
    301       }
    302      
    303       foreach ($attachments as $attachment_url) {
    304         $mail->AddAttachment($attachment_url);      // attachment
    305       }
    306 
    307       if ($smtp_auth) {
    308         $mail->IsSMTP(); // telling the class to use SMTP
    309         $mail->SMTPAuth = true;
    310         if ($smtp_mail_host != "") {
    311           $mail->Host = $smtp_mail_host;
    312         }
    313         if ($smtp_mail_port != "") {
    314           $mail->Port = $smtp_mail_port;
    315         }
    316         if ($smtp_mail_username != "") {
    317           $mail->Username = $smtp_mail_username;
    318         }
    319         if ($smtp_mail_password != "") {
    320           $mail->Password = $smtp_mail_password;
    321         }
    322 
    323         foreach ($secure_array as $secure) {
    324           if ($secure == "tls") {
    325             $mail->SMTPSecure = 'tls';
    326           } else if ($secure == "ssl") {
    327             $mail->SMTPSecure = 'ssl';
    328           }
    329         }
    330 
    331       }
    332 
    333       if(!$mail->Send()) {
    334         return "<div class='error'>Mailer Error: ".$mail->ErrorInfo."</div>";
    335       } else {
    336         return "<div class='success'>Message sent!</div>";
    337230      }
    338231    }
  • search-my-theme/trunk/readme.txt

    r2283838r2352126 
    55Requires at least: 3.3
    66Tested up to: 5.5
    7 Stable tag: 3.2
     7Stable tag: 3.2.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    โ€ฆโ€ฆ 
    3131== Changelog ==
    3232
     33= 3.2.1 =
     34
     35* Removed redundant email library.
     36
    3337= 3.2 =
    3438
    โ€ฆโ€ฆ 
    5357== Upgrade notice ==
    5458
     59= 3.2.1 =
     60
     61* Removed redundant email library.
     62
    5563= 3.2 =
    5664
  • search-my-theme/trunk/search-my-theme.php

    r2283838r2352126 
    17174) Activate the plugin.
    1818
    19 Version: 3.2
     19Version: 3.2.1
    2020Author: TheOnlineHero - Tom Skroza
    2121License: GPL2
Note: See TracChangeset for help on using the changeset viewer.