@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | use PHPMailer\PHPMailer\PHPMailer; |
12 | 12 | use PHPMailer\PHPMailer\Exception; |
13 | 13 | |
14 | -require MODX_MANAGER_PATH . 'includes/controls/phpmailer/Exception.php'; |
|
15 | -require MODX_MANAGER_PATH . 'includes/controls/phpmailer/PHPMailer.php'; |
|
16 | -require MODX_MANAGER_PATH . 'includes/controls/phpmailer/SMTP.php'; |
|
14 | +require MODX_MANAGER_PATH.'includes/controls/phpmailer/Exception.php'; |
|
15 | +require MODX_MANAGER_PATH.'includes/controls/phpmailer/PHPMailer.php'; |
|
16 | +require MODX_MANAGER_PATH.'includes/controls/phpmailer/SMTP.php'; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Class MODxMailer |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | public function init(DocumentParser $modx) |
34 | 34 | { |
35 | 35 | $this->modx = $modx; |
36 | - $this->PluginDir = MODX_MANAGER_PATH . 'includes/controls/phpmailer/'; |
|
36 | + $this->PluginDir = MODX_MANAGER_PATH.'includes/controls/phpmailer/'; |
|
37 | 37 | |
38 | 38 | switch ($modx->config['email_method']) { |
39 | 39 | case 'smtp': |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | mb_language($this->mb_language); |
98 | 98 | mb_internal_encoding($modx->config['modx_charset']); |
99 | 99 | } |
100 | - $exconf = MODX_MANAGER_PATH . 'includes/controls/phpmailer/config.inc.php'; |
|
100 | + $exconf = MODX_MANAGER_PATH.'includes/controls/phpmailer/config.inc.php'; |
|
101 | 101 | if (is_file($exconf)) { |
102 | 102 | include($exconf); |
103 | 103 | } |
@@ -165,12 +165,12 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | if ($this->modx->debug) { |
168 | - $debug_info = 'CharSet = ' . $this->CharSet . "\n"; |
|
169 | - $debug_info .= 'Encoding = ' . $this->Encoding . "\n"; |
|
170 | - $debug_info .= 'mb_language = ' . $this->mb_language . "\n"; |
|
171 | - $debug_info .= 'encode_header_method = ' . $this->encode_header_method . "\n"; |
|
168 | + $debug_info = 'CharSet = '.$this->CharSet."\n"; |
|
169 | + $debug_info .= 'Encoding = '.$this->Encoding."\n"; |
|
170 | + $debug_info .= 'mb_language = '.$this->mb_language."\n"; |
|
171 | + $debug_info .= 'encode_header_method = '.$this->encode_header_method."\n"; |
|
172 | 172 | $debug_info .= "send_mode = {$mode}\n"; |
173 | - $debug_info .= 'Subject = ' . $this->Subject . "\n"; |
|
173 | + $debug_info .= 'Subject = '.$this->Subject."\n"; |
|
174 | 174 | $log = "<pre>{$debug_info}\n{$header}\n{$org_body}</pre>"; |
175 | 175 | $this->modx->logEvent(1, 1, $log, 'MODxMailer debug information'); |
176 | 176 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | ini_set('sendmail_from', $old_from); |
235 | 235 | } |
236 | 236 | if (!$rt) { |
237 | - $msg = $this->Lang('instantiate') . "<br />\n"; |
|
237 | + $msg = $this->Lang('instantiate')."<br />\n"; |
|
238 | 238 | $msg .= "{$this->Subject}<br />\n"; |
239 | 239 | $msg .= "{$this->FromName}<{$this->From}><br />\n"; |
240 | 240 | $msg .= mb_convert_encoding($body, $this->modx->config['modx_charset'], $this->CharSet); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | */ |
254 | 254 | public function SetError($msg) |
255 | 255 | { |
256 | - $msg .= '<pre>' . print_r(get_object_vars($this), true) . '</pre>'; |
|
256 | + $msg .= '<pre>'.print_r(get_object_vars($this), true).'</pre>'; |
|
257 | 257 | $this->modx->config['send_errormail'] = '0'; |
258 | 258 | $this->modx->logEvent(0, 3, $msg, 'phpmailer'); |
259 | 259 | |
@@ -282,14 +282,14 @@ discard block |
||
282 | 282 | /** |
283 | 283 | * @return string |
284 | 284 | */ |
285 | - public function getMIMEHeader() { |
|
285 | + public function getMIMEHeader(){ |
|
286 | 286 | return $this->MIMEHeader; |
287 | 287 | } |
288 | 288 | |
289 | 289 | /** |
290 | 290 | * @return string |
291 | 291 | */ |
292 | - public function getMIMEBody() { |
|
292 | + public function getMIMEBody(){ |
|
293 | 293 | return $this->MIMEBody; |
294 | 294 | } |
295 | 295 | |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | * |
299 | 299 | * @return $this |
300 | 300 | */ |
301 | - public function setMIMEHeader($header = '') { |
|
301 | + public function setMIMEHeader($header = ''){ |
|
302 | 302 | $this->MIMEHeader = $header; |
303 | 303 | |
304 | 304 | return $this; |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | * |
310 | 310 | * @return $this |
311 | 311 | */ |
312 | - public function setMIMEBody($body = '') { |
|
312 | + public function setMIMEBody($body = ''){ |
|
313 | 313 | $this->MIMEBody = $body; |
314 | 314 | |
315 | 315 | return $this; |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | * |
321 | 321 | * @return $this |
322 | 322 | */ |
323 | - public function setMailHeader($header = '') { |
|
323 | + public function setMailHeader($header = ''){ |
|
324 | 324 | $this->mailHeader = $header; |
325 | 325 | |
326 | 326 | return $this; |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | /** |
330 | 330 | * @return string |
331 | 331 | */ |
332 | - public function getMessageID() { |
|
333 | - return trim($this->lastMessageID,'<>'); |
|
332 | + public function getMessageID(){ |
|
333 | + return trim($this->lastMessageID, '<>'); |
|
334 | 334 | } |
335 | 335 | } |