Plugin Directory

Changeset 2352119


Ignore:
Timestamp:
08/04/2020 04:41:40 AM (6 years ago)
Author:
MMDeveloper
Message:

Removed redundant php mailer lib.

Location:
wp-seo-redirect-301
Files:
17 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-seo-redirect-301/trunk/lib/tom-m8te.php

    r2131384 r2352119  
    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    }
  • wp-seo-redirect-301/trunk/readme.txt

    r2283792 r2352119  
    44Requires at least: 5.5
    55Tested up to: 5.5
    6 Stable tag: 2.3.0
     6Stable tag: 2.3.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4545== Changelog ==
    4646
     47= 2.3.1 =
     48
     49* Removed redundant email library.
     50
    4751= 2.3.0 =
    4852
     
    192196== Upgrade notice ==
    193197
     198= 2.3.1 =
     199
     200* Removed redundant email library.
     201
    194202= 2.3.0 =
    195203
  • wp-seo-redirect-301/trunk/seo_redirect_301s.php

    r2283792 r2352119  
    44Plugin URI: http://wordpress.org/extend/plugins/wp-seo-redirect-301/
    55Description: Records urls and if a pages url changes, system redirects old url to the updated url.
    6 Version: 2.3.0
     6Version: 2.3.1
    77Author: Tom Skroza
    88License: GPL2
Note: See TracChangeset for help on using the changeset viewer.