Plugin Directory

Changeset 1598086


Ignore:
Timestamp:
02/17/2017 02:40:55 PM (9 years ago)
Author:
CodeCabin_
Message:
  • 1.03 - 2017-02-17 - High Priority
  • PHP Mailer removed from the plugin
Location:
nifty-desk
Files:
200 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • nifty-desk/trunk/nifty-desk.php

    r1592607 r1598086  
    44  Plugin URI: http://niftydesk.org/
    55  Description: Create a support centre within your WordPress admin. No need for third party systems!
    6   Version: 1.02
     6  Version: 1.03
    77  Author: CODECABIN_
    88  Author URI: http://niftydesk.org/
     
    1010
    1111/*
     12 * 1.03 - 2017-02-17 - High Priority
     13 * PHP Mailer removed from the plugin
     14 *
    1215 * 1.02 - 2017-02-09 - Medium Priority
    1316 * You can now search for tickets based on the author email address
     
    3538global $nifty_desk_version;
    3639global $nifty_desk_version_string;
    37 $nifty_desk_version = "1.02";
     40$nifty_desk_version = "1.03";
    3841$nifty_desk_version_string = "basic";
    3942
     
    33523355    if(isset($data['nifty_desk_smtp_encryption_setting_php_mailer'])) { $nifty_desk_smtp_encryption_setting_php_mailer=$data['nifty_desk_smtp_encryption_setting_php_mailer']; }
    33533356   
    3354    
    3355    
    3356 
    3357 
    33583357    if(isset($data['rb_nifty_desk_mailing_system_selection'])&&$data['rb_nifty_desk_mailing_system_selection']==='smtp') {
    33593358           
    3360             include_once "includes/PHPMailer-master/PHPMailerAutoload.php";
    3361 
    3362             $php_mailer_object = new PHPMailer;
    3363             $php_mailer_object->isSMTP();
    3364             $php_mailer_object->Host = $nifty_desk_smtp_host_setting_php_mailer;       
    3365             $php_mailer_object->Port = $nifty_desk_smtp_port_setting_php_mailer;
    3366             $php_mailer_object->SMTPAuth = true;
    3367             $php_mailer_object->SMTPSecure = $nifty_desk_smtp_encryption_setting_php_mailer;
    3368             $php_mailer_object->Username = $nifty_desk_smtp_username_setting_php_mailer;
    3369             $php_mailer_object->Password = $nifty_desk_smtp_password_setting_php_mailer;
    3370             $php_mailer_object->CharSet = "UTF-8";
    3371             if($from_address!==''&&$from_name!=='') {
    3372                 $php_mailer_object->setFrom($from_address,$from_name); 
    3373             }
    3374            
    3375             $php_mailer_object->addAddress($email,'User');
    3376            
    3377             if($replyto_address!==''&&$replyto_name!=='') { $php_mailer_object->addReplyTo($replyto_address,$replyto_name); }
    3378            
    3379            
    3380             $php_mailer_object->Subject = $subject;
    3381 
    3382             if ($in_reply_to) { $php_mailer_object->addCustomHeader('In-Reply-To', $in_reply_to); }
    3383             if ($in_reply_to) { $php_mailer_object->addCustomHeader('References', $in_reply_to); }
    3384 
    3385            
    3386             $php_mailer_object->msgHTML($message."<br/><br/> <b>Sent using SMTP settings</b>");
    3387        
    3388             if(!$php_mailer_object->send()) { $result=use_wp_mail_as_default($email, $subject, $message, $wp_mail_headers,$attachments, $post_id); }
    3389             else {
    3390                 $result=true;
    3391             }
     3359            //Create a new PHPMailer instance
     3360
     3361            global $phpmailer;             
     3362
     3363            if( $phpmailer !== null ){
     3364               
     3365         
     3366                // (Re)create it, if it's gone missing
     3367                if ( ! ( $phpmailer instanceof PHPMailer ) ) {
     3368                    require_once ABSPATH . WPINC . '/class-phpmailer.php';
     3369                    require_once ABSPATH . WPINC . '/class-smtp.php';
     3370                    $php_mailer_object = new PHPMailer( true );
     3371                }
     3372                $php_mailer_object->isSMTP();
     3373                $php_mailer_object->Host = $nifty_desk_smtp_host_setting_php_mailer;       
     3374                $php_mailer_object->Port = $nifty_desk_smtp_port_setting_php_mailer;
     3375                $php_mailer_object->SMTPAuth = true;
     3376                $php_mailer_object->SMTPSecure = $nifty_desk_smtp_encryption_setting_php_mailer;
     3377                $php_mailer_object->Username = $nifty_desk_smtp_username_setting_php_mailer;
     3378                $php_mailer_object->Password = $nifty_desk_smtp_password_setting_php_mailer;
     3379                $php_mailer_object->CharSet = "UTF-8";
     3380                if($from_address!==''&&$from_name!=='') {
     3381                    $php_mailer_object->setFrom($from_address,$from_name); 
     3382                }
     3383               
     3384                $php_mailer_object->addAddress($email,'User');
     3385               
     3386                if($replyto_address!==''&&$replyto_name!=='') { $php_mailer_object->addReplyTo($replyto_address,$replyto_name); }
     3387               
     3388               
     3389                $php_mailer_object->Subject = $subject;
     3390
     3391                if ($in_reply_to) { $php_mailer_object->addCustomHeader('In-Reply-To', $in_reply_to); }
     3392                if ($in_reply_to) { $php_mailer_object->addCustomHeader('References', $in_reply_to); }
     3393
     3394               
     3395                $php_mailer_object->msgHTML($message."<br/><br/> <b>Sent using SMTP settings</b>");
     3396           
     3397                if(!$php_mailer_object->send()) { $result=use_wp_mail_as_default($email, $subject, $message, $wp_mail_headers,$attachments, $post_id); }
     3398                else {
     3399                    $result=true;
     3400                }
     3401
     3402            } else {
     3403
     3404                $result=use_wp_mail_as_default($email, $subject, $message, $wp_mail_headers,$attachments, $post_id);
     3405
     3406            }
    33923407           
    33933408    }
  • nifty-desk/trunk/readme.txt

    r1592607 r1598086  
    9898== Changelog  ==
    9999
     100= 1.03 - 2017-02-17 - High Priority =
     101* PHP Mailer removed from the plugin
     102
    100103= 1.02 - 2017-02-09 - Medium Priority =
    101104* You can now search for tickets based on the author email address
Note: See TracChangeset for help on using the changeset viewer.