Plugin Directory

Changeset 1719010


Ignore:
Timestamp:
08/24/2017 08:15:38 PM (9 years ago)
Author:
Cimmo
Message:

Add support for SwiftMailer 6.0.1

Location:
cimy-swift-smtp/trunk
Files:
294 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • cimy-swift-smtp/trunk/README_OFFICIAL.txt

    r1653904 r1719010  
    6262
    6363CHANGELOG:
     64v3.0.0 - /08/2017
     65- Updated Swift Mailer to 6.0.1 (dropped support for PHP <=5.x)
     66
    6467v2.6.3 - 10/05/2017
    6568- Updated Swift Mailer to 5.4.8
  • cimy-swift-smtp/trunk/cimy_swift_smtp.php

    r1653904 r1719010  
    55Description: Send email via SMTP (Compatible with GMAIL)
    66Author: Marco Cimmino
    7 Version: 2.6.3
     7Version: 3.0.0
    88Author URI: mailto:cimmino.marco@gmail.com
    99
  • cimy-swift-smtp/trunk/swift_engine.php

    r922841 r1719010  
    1212        $attachments = explode( "\n", str_replace( "\r\n", "\n", $attachments ) );
    1313
    14     require_once 'Swift/lib/swift_required.php';
     14    require_once 'vendor/autoload.php';
    1515    $sender_email = "";
    1616    $sender_name = "";
     
    171171
    172172    //Create a message
    173     $message = Swift_Message::newInstance($subject)
     173    $message = (new Swift_Message($subject))
    174174        ->setFrom(array(apply_filters('wp_mail_from', $from_email) => apply_filters('wp_mail_from_name', $from_name)))
    175175        ->setBody($message)
     
    304304    try {
    305305        // Create the Transport then call setUsername() and setPassword()
    306         $transport = Swift_SmtpTransport::newInstance($st_smtp_config['server'], $st_smtp_config['port']);
     306        $transport = new Swift_SmtpTransport($st_smtp_config['server'], $st_smtp_config['port']);
    307307
    308308        if (!empty($st_smtp_config['ssl']))
     
    316316
    317317        // Create the Mailer using your created Transport
    318         $mailer = Swift_Mailer::newInstance($transport);
     318        $mailer = new Swift_Mailer($transport);
    319319
    320320        // Send!
Note: See TracChangeset for help on using the changeset viewer.