equal
deleted
inserted
replaced
24 var $addresses, $reply_to, $from; |
24 var $addresses, $reply_to, $from; |
25 var $use_smtp; |
25 var $use_smtp; |
26 |
26 |
27 var $tpl_msg; |
27 var $tpl_msg; |
28 |
28 |
29 function __construct($use_smtp) |
29 function __construct($use_smtp = false) |
30 { |
30 { |
31 $this->reset(); |
31 $this->reset(); |
32 $this->use_smtp = $use_smtp; |
32 $this->use_smtp = $use_smtp; |
33 $this->reply_to = $this->from = ''; |
33 $this->reply_to = $this->from = ''; |
|
34 $this->addresses = array( |
|
35 'cc' => array(), |
|
36 'bcc' => array() |
|
37 ); |
34 } |
38 } |
35 |
39 |
36 // Resets all the data (address, template file, etc etc to default |
40 // Resets all the data (address, template file, etc etc to default |
37 function reset() |
41 function reset() |
38 { |
42 { |
125 $this->subject = (($this->subject != '') ? $this->subject : 'No Subject'); |
129 $this->subject = (($this->subject != '') ? $this->subject : 'No Subject'); |
126 } |
130 } |
127 |
131 |
128 if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match)) |
132 if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match)) |
129 { |
133 { |
130 $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim('iso-8859-1'); |
134 $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim('utf-8'); |
131 $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#'); |
135 $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#'); |
132 } |
136 } |
133 else |
137 else |
134 { |
138 { |
135 $this->encoding = trim('iso-8859-1'); |
139 $this->encoding = trim('iso-8859-1'); |