source-class-C_mailer

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.
Overview

Classes

Interfaces

Exceptions

Functions

 1: <?php
 2: //============================================================+
 3: // File name   : cp_class_mailer.php
 4: // Begin       : 2001-10-20
 5: // Last Update : 2010-03-10
 6: //
 7: // Description : Extend PHPMailer class with inheritance
 8: //
 9: // Author: Nicola Asuni
10: //
11: // (c) Copyright:
12: //               Nicola Asuni
13: //               Tecnick.com LTD
14: //               www.tecnick.com
15: //               info@tecnick.com
16: //
17: // License:
18: //    Copyright (C) 2004-2010  Nicola Asuni - Tecnick.com LTD
19: //    See LICENSE.TXT file for more information.
20: //============================================================+
21: 
22: /**
23:  * @file
24:  * PHPMailer class extension.
25:  * @package PHPMailer
26:  * @brief PHP email transport class
27:  * @author Nicola Asuni
28:  * @since 2005-02-24
29:  */
30: 
31: /**
32:  */
33: 
34: require_once('../config/tce_config.php');
35: 
36: require_once('../../shared/config/tce_email_config.php'); //Include default public variables
37: 
38: // Set the custom error handler function
39: // This suppress the warnings due to the fact that phpmailer class is written in PHP4
40: $old_error_handler = set_error_handler('F_error_handler', E_ERROR | E_WARNING | E_PARSE);
41: // include the phpmailer class
42: require_once('../../shared/phpmailer/PHPMailerAutoload.php');
43: require_once('../../shared/phpmailer/class.phpmailer.php');
44: 
45: /**
46:  * @class C_mailer
47:  * PHPMailer class extension.
48:  * @author Nicola Asuni
49:  * @package PHPMailer
50:  * @since 2005-02-24
51:  */
52: class C_mailer extends PHPMailer
53: {
54:     /**
55:      * Replace the default SetError
56:      * @param $msg (string) error message
57:      * @public
58:      * @return void
59:      */
60:     public function SetError($msg)
61:     {
62:         parent::SetError($msg);
63:         F_print_error('ERROR', $this->ErrorInfo);
64:         exit;
65:     }
66: 
67:     /**
68:      * Set the language array
69:      * @param $lang (array) Language array
70:      * @public
71:      * @return void
72:      */
73:     public function setLanguageData($lang)
74:     {
75:         $this->language = $lang;
76:     }
77: 
78:     /**
79:      * Returns a message in the appropriate language.
80:      * (override original Lang method).
81:      * @param $key (string) language key
82:      * @protected
83:      * @return string
84:      */
85:     protected function Lang($key)
86:     {
87:         if (isset($this->language['m_mailerror_'.$key])) {
88:             return $this->language['m_mailerror_'.$key];
89:         } else {
90:             return 'UNKNOW ERROR: ['.$key.']';
91:         }
92:     }
93: 
94: } //end of class
95: 
96: //============================================================+
97: // END OF FILE
98: //============================================================+
99: 
 

© 2004-2018 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy