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 19 20 21 22
23 class Email extends PHPMailer {
24
25 26 27 28 29 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 }