azmicolejr

PHPMailer_Lib

Jun 30th, 2019
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3.  
  4. use phpmailer\phpmailer\PHPMailer;
  5. use phpmailer\phpmailer\Exception;
  6.  
  7. class PHPMailer_Lib
  8. {
  9.     public function __construct(){
  10.         log_message('Debug', 'PHPMailer class is loaded.');
  11.     }
  12.  
  13.     public function load(){
  14.       // Include PHPMailer library files
  15.       require_once 'vendor/phpmailer/phpmailer/src/Exception.php';
  16.       require_once 'vendor/phpmailer/phpmailer/src/PHPMailer.php';
  17.       require_once 'vendor/phpmailer/phpmailer/src/SMTP.php';
  18.  
  19.       $mail = new PHPMailer;
  20.       return $mail;
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment