AloFramework documentation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Namespaces

  • Alo
    • Cache
    • Controller
    • Db
    • Exception
    • Session
    • Statics
    • Test
    • Validators
  • Controller
  • None
  • PHP

Classes

  • Cron
  • cURL
  • Email
  • File
  • Handler
  • Profiler
  • SFTP
 1 <?php
 2 
 3    namespace Alo;
 4 
 5    use PHPMailer;
 6 
 7    if (!defined('GEN_START')) {
 8       http_response_code(404);
 9       die();
10    }
11 
12    require_once DIR_SYS . 'external' . DIRECTORY_SEPARATOR . 'email' . DIRECTORY_SEPARATOR . 'class.phpmailer.php';
13    require_once DIR_SYS . 'external' . DIRECTORY_SEPARATOR . 'email' . DIRECTORY_SEPARATOR . 'PHPMailerAutoload.php';
14 
15    \Alo::loadConfig('email');
16 
17    /**
18     * Mail wrapper for the external PHPMailer library
19     *
20     * @author Art <a.molcanovas@gmail.com>
21     * @link   https://github.com/PHPMailer/PHPMailer
22     */
23    class Email extends PHPMailer {
24 
25       /**
26        * Instantiates the class
27        *
28        * @author Art <a.molcanovas@gmail.com>
29        * @param boolean $exceptions Should we throw external exceptions?
30        */
31       function __construct($exceptions = false) {
32          parent::__construct($exceptions);
33 
34          if (ALO_EMAIL_ERR_LANG != 'en') {
35             $this->setLanguage(ALO_EMAIL_ERR_LANG);
36          }
37 
38          $this->isSMTP(ALO_EMAIL_USE_SMTP);
39          $this->Host = ALO_EMAIL_HOSTS;
40          $this->SMTPAuth = ALO_EMAIL_AUTH;
41          $this->Username = ALO_EMAIL_USERNAME;
42          $this->Password = ALO_EMAIL_PASSWORD;
43          $this->SMTPSecure = ALO_EMAIL_SECURE;
44          $this->Port = ALO_EMAIL_PORT;
45          $this->From = ALO_EMAIL_FROM_DEFAULT_ADDR;
46          $this->FromName = ALO_EMAIL_FROM_DEFAULT_NAME;
47          $this->Subject = ALO_EMAIL_SUBJECT_DEFAULT;
48          $this->isHTML(ALO_EMAIL_HTML_ENABLED);
49       }
50 
51    }
AloFramework documentation API documentation generated by ApiGen 2.8.0