@@ -69,9 +69,9 @@ |
||
69 | 69 | /** |
70 | 70 | * Function to clean the data from the Callback Function for optimized display |
71 | 71 | * |
72 | - * @param $email |
|
73 | - * @param $bounce_type |
|
74 | - * @param $remove |
|
72 | + * @param string $email |
|
73 | + * @param string $bounce_type |
|
74 | + * @param boolean $remove |
|
75 | 75 | * |
76 | 76 | * @return mixed |
77 | 77 | */ |
@@ -36,15 +36,15 @@ discard block |
||
36 | 36 | $remove = $displayData['remove']; |
37 | 37 | $removeraw = $displayData['removestat']; |
38 | 38 | |
39 | - $msg = $msgnum . ',' . $currentTime . ',' . $ruleNo . ',' . $ruleCat . ',' . $bounceType . ',' . $removeraw . ',' . $email . ',' . $subject; |
|
39 | + $msg = $msgnum.','.$currentTime.','.$ruleNo.','.$ruleCat.','.$bounceType.','.$removeraw.','.$email.','.$subject; |
|
40 | 40 | |
41 | - $filename = 'logs/bouncelog_' . \date('m') . \date('Y') . '.csv'; |
|
41 | + $filename = 'logs/bouncelog_'.\date('m').\date('Y').'.csv'; |
|
42 | 42 | if (!\file_exists($filename)) { |
43 | - $tmsg = 'Msg#,Current Time,Rule Number,Rule Category,Bounce Type,Status,Email,Subject' . "\n" . $msg; |
|
43 | + $tmsg = 'Msg#,Current Time,Rule Number,Rule Category,Bounce Type,Status,Email,Subject'."\n".$msg; |
|
44 | 44 | } else { |
45 | 45 | $fileContents = \file_get_contents($filename); |
46 | 46 | |
47 | - if (\stripos($fileContents, "\n" . $msgnum . ',') !== false) { |
|
47 | + if (\stripos($fileContents, "\n".$msgnum.',') !== false) { |
|
48 | 48 | $doPutFile = false; |
49 | 49 | } |
50 | 50 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | $handle = \fopen($filename, 'ab'); |
55 | 55 | if ($handle) { |
56 | - if (\fwrite($handle, $tmsg . "\n") === false) { |
|
56 | + if (\fwrite($handle, $tmsg."\n") === false) { |
|
57 | 57 | echo 'Cannot write message<br />'; |
58 | 58 | } |
59 | 59 | \fclose($handle); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | echo 'Cannot open file to append<br />'; |
62 | 62 | } |
63 | 63 | |
64 | - echo $msgnum . ': ' . $ruleNo . ' | ' . $ruleCat . ' | ' . $bounceType . ' | ' . $remove . ' | ' . $email . ' | ' . $subject . "<br />\n"; |
|
64 | + echo $msgnum.': '.$ruleNo.' | '.$ruleCat.' | '.$bounceType.' | '.$remove.' | '.$email.' | '.$subject."<br />\n"; |
|
65 | 65 | |
66 | 66 | return true; |
67 | 67 | } |
@@ -109,16 +109,16 @@ discard block |
||
109 | 109 | // change the remove flag from true or 1 to textual representation |
110 | 110 | if (\stripos($remove, 'moved') !== false && \stripos($remove, 'hard') !== false) { |
111 | 111 | $data['removestat'] = 'moved (hard)'; |
112 | - $data['remove'] = '<span style="color:red;">' . 'moved (hard)' . '</span>'; |
|
112 | + $data['remove'] = '<span style="color:red;">'.'moved (hard)'.'</span>'; |
|
113 | 113 | } elseif (\stripos($remove, 'moved') !== false && \stripos($remove, 'soft') !== false) { |
114 | 114 | $data['removestat'] = 'moved (soft)'; |
115 | - $data['remove'] = '<span style="color:gray;">' . 'moved (soft)' . '</span>'; |
|
115 | + $data['remove'] = '<span style="color:gray;">'.'moved (soft)'.'</span>'; |
|
116 | 116 | } elseif ($remove == true || $remove == '1') { |
117 | 117 | $data['removestat'] = 'deleted'; |
118 | - $data['remove'] = '<span style="color:red;">' . 'deleted' . '</span>'; |
|
118 | + $data['remove'] = '<span style="color:red;">'.'deleted'.'</span>'; |
|
119 | 119 | } else { |
120 | 120 | $data['removestat'] = 'not deleted'; |
121 | - $data['remove'] = '<span style="color:gray;">' . 'not deleted' . '</span>'; |
|
121 | + $data['remove'] = '<span style="color:gray;">'.'not deleted'.'</span>'; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | return $data; |
@@ -58,9 +58,9 @@ |
||
58 | 58 | /** |
59 | 59 | * Function to clean the data from the Callback Function for optimized display |
60 | 60 | * |
61 | - * @param $email |
|
62 | - * @param $bounceType |
|
63 | - * @param $remove |
|
61 | + * @param string $email |
|
62 | + * @param string $bounceType |
|
63 | + * @param boolean $remove |
|
64 | 64 | * |
65 | 65 | * @return mixed |
66 | 66 | */ |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $emailAddy = $displayData['emailAddy']; |
51 | 51 | $remove = $displayData['remove']; |
52 | 52 | |
53 | - echo $msgnum . ': ' . $ruleNo . ' | ' . $ruleCat . ' | ' . $bounceType . ' | ' . $remove . ' | ' . $email . ' | ' . $subject . "<br />\n"; |
|
53 | + echo $msgnum.': '.$ruleNo.' | '.$ruleCat.' | '.$bounceType.' | '.$remove.' | '.$email.' | '.$subject."<br />\n"; |
|
54 | 54 | |
55 | 55 | return true; |
56 | 56 | } |
@@ -97,16 +97,16 @@ discard block |
||
97 | 97 | // change the remove flag from true or 1 to textual representation |
98 | 98 | if (\stripos($remove, 'moved') !== false && \stripos($remove, 'hard') !== false) { |
99 | 99 | $data['removestat'] = 'moved (hard)'; |
100 | - $data['remove'] = '<span style="color:red;">' . 'moved (hard)' . '</span>'; |
|
100 | + $data['remove'] = '<span style="color:red;">'.'moved (hard)'.'</span>'; |
|
101 | 101 | } elseif (\stripos($remove, 'moved') !== false && \stripos($remove, 'soft') !== false) { |
102 | 102 | $data['removestat'] = 'moved (soft)'; |
103 | - $data['remove'] = '<span style="color:gray;">' . 'moved (soft)' . '</span>'; |
|
103 | + $data['remove'] = '<span style="color:gray;">'.'moved (soft)'.'</span>'; |
|
104 | 104 | } elseif ($remove == true || $remove == '1') { |
105 | 105 | $data['removestat'] = 'deleted'; |
106 | - $data['remove'] = '<span style="color:red;">' . 'deleted' . '</span>'; |
|
106 | + $data['remove'] = '<span style="color:red;">'.'deleted'.'</span>'; |
|
107 | 107 | } else { |
108 | 108 | $data['removestat'] = 'not deleted'; |
109 | - $data['remove'] = '<span style="color:gray;">' . 'not deleted' . '</span>'; |
|
109 | + $data['remove'] = '<span style="color:gray;">'.'not deleted'.'</span>'; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | return $data; |
@@ -58,9 +58,9 @@ |
||
58 | 58 | /** |
59 | 59 | * Function to clean the data from the Callback Function for optimized display |
60 | 60 | * |
61 | - * @param $email |
|
62 | - * @param $bounceType |
|
63 | - * @param $remove |
|
61 | + * @param string $email |
|
62 | + * @param string $bounceType |
|
63 | + * @param boolean $remove |
|
64 | 64 | * |
65 | 65 | * @return mixed |
66 | 66 | */ |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $emailName = $displayData['emailName']; |
33 | 33 | $emailAddy = $displayData['emailAddy']; |
34 | 34 | $remove = $displayData['remove']; |
35 | - echo $msgnum . ': ' . $ruleNo . ' | ' . $ruleCat . ' | ' . $bounceType . ' | ' . $remove . ' | ' . $email . ' | ' . $subject . "<br />\n"; |
|
35 | + echo $msgnum.': '.$ruleNo.' | '.$ruleCat.' | '.$bounceType.' | '.$remove.' | '.$email.' | '.$subject."<br />\n"; |
|
36 | 36 | |
37 | 37 | return true; |
38 | 38 | } |
@@ -80,16 +80,16 @@ discard block |
||
80 | 80 | // change the remove flag from true or 1 to textual representation |
81 | 81 | if (\stripos($remove, 'moved') !== false && \stripos($remove, 'hard') !== false) { |
82 | 82 | $data['removestat'] = 'moved (hard)'; |
83 | - $data['remove'] = '<span style="color:red;">' . 'moved (hard)' . '</span>'; |
|
83 | + $data['remove'] = '<span style="color:red;">'.'moved (hard)'.'</span>'; |
|
84 | 84 | } elseif (\stripos($remove, 'moved') !== false && \stripos($remove, 'soft') !== false) { |
85 | 85 | $data['removestat'] = 'moved (soft)'; |
86 | - $data['remove'] = '<span style="color:gray;">' . 'moved (soft)' . '</span>'; |
|
86 | + $data['remove'] = '<span style="color:gray;">'.'moved (soft)'.'</span>'; |
|
87 | 87 | } elseif ($remove == true || $remove == '1') { |
88 | 88 | $data['removestat'] = 'deleted'; |
89 | - $data['remove'] = '<span style="color:red;">' . 'deleted' . '</span>'; |
|
89 | + $data['remove'] = '<span style="color:red;">'.'deleted'.'</span>'; |
|
90 | 90 | } else { |
91 | 91 | $data['removestat'] = 'not deleted'; |
92 | - $data['remove'] = '<span style="color:gray;">' . 'not deleted' . '</span>'; |
|
92 | + $data['remove'] = '<span style="color:gray;">'.'not deleted'.'</span>'; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | return $data; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | echo '<hr style="width:200px;" />'; |
86 | 86 | $time_end = microtime_float(); |
87 | 87 | $time = $time_end - $time_start; |
88 | -echo 'Seconds to process: ' . $time . '<br />'; |
|
88 | +echo 'Seconds to process: '.$time.'<br />'; |
|
89 | 89 | |
90 | 90 | /** |
91 | 91 | * @return float |
@@ -94,5 +94,5 @@ discard block |
||
94 | 94 | { |
95 | 95 | list($usec, $sec) = \explode(' ', \microtime()); |
96 | 96 | |
97 | - return (float) $usec + (float) $sec; |
|
97 | + return (float)$usec + (float)$sec; |
|
98 | 98 | } |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | |
533 | 533 | if ($result['rule_no'] == '0000') { |
534 | 534 | if ($debug_mode) { |
535 | - echo 'Body:' . $bmh_newline . $body . $bmh_newline; |
|
535 | + echo 'Body:'.$bmh_newline.$body.$bmh_newline; |
|
536 | 536 | echo $bmh_newline; |
537 | 537 | } |
538 | 538 | } else { |
@@ -582,14 +582,14 @@ discard block |
||
582 | 582 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
583 | 583 | $email_arr = @\imap_rfc822_parse_adrlist($email, 'default.domain.name'); |
584 | 584 | if (isset($email_arr[0]->host) && $email_arr[0]->host != '.SYNTAX-ERROR.' && $email_arr[0]->host != 'default.domain.name') { |
585 | - $result['email'] = $email_arr[0]->mailbox . '@' . $email_arr[0]->host; |
|
585 | + $result['email'] = $email_arr[0]->mailbox.'@'.$email_arr[0]->host; |
|
586 | 586 | } |
587 | 587 | } elseif (\preg_match('/Final-Recipient: rfc822;(.*)/i', $dsn_report, $match)) { |
588 | 588 | $email = \trim($match[1], "<> \t\r\n\0\x0B"); |
589 | 589 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
590 | 590 | $email_arr = @\imap_rfc822_parse_adrlist($email, 'default.domain.name'); |
591 | 591 | if (isset($email_arr[0]->host) && $email_arr[0]->host != '.SYNTAX-ERROR.' && $email_arr[0]->host != 'default.domain.name') { |
592 | - $result['email'] = $email_arr[0]->mailbox . '@' . $email_arr[0]->host; |
|
592 | + $result['email'] = $email_arr[0]->mailbox.'@'.$email_arr[0]->host; |
|
593 | 593 | } |
594 | 594 | } |
595 | 595 | |
@@ -1564,7 +1564,7 @@ discard block |
||
1564 | 1564 | * Delivery to the following recipients failed. |
1565 | 1565 | * [email protected] |
1566 | 1566 | */ |
1567 | - elseif (\preg_match("/Delivery to the following recipients failed.*\n.*\n.*|Message\s+delivery\s+failed" . \preg_quote($result['email'], '/') . '/i', $dsn_msg)) { |
|
1567 | + elseif (\preg_match("/Delivery to the following recipients failed.*\n.*\n.*|Message\s+delivery\s+failed".\preg_quote($result['email'], '/').'/i', $dsn_msg)) { |
|
1568 | 1568 | $result['rule_cat'] = 'other'; |
1569 | 1569 | $result['rule_no'] = '0176'; |
1570 | 1570 | } |
@@ -1613,11 +1613,11 @@ discard block |
||
1613 | 1613 | |
1614 | 1614 | if ($result['rule_no'] == '0000') { |
1615 | 1615 | if ($debug_mode) { |
1616 | - echo 'email: ' . $result['email'] . $bmh_newline; |
|
1617 | - echo 'Action: ' . $action . $bmh_newline; |
|
1618 | - echo 'Status: ' . $status_code . $bmh_newline; |
|
1619 | - echo 'Diagnostic-Code: ' . $diag_code . $bmh_newline; |
|
1620 | - echo "DSN Message:<br />\n" . $dsn_msg . $bmh_newline; |
|
1616 | + echo 'email: '.$result['email'].$bmh_newline; |
|
1617 | + echo 'Action: '.$action.$bmh_newline; |
|
1618 | + echo 'Status: '.$status_code.$bmh_newline; |
|
1619 | + echo 'Diagnostic-Code: '.$diag_code.$bmh_newline; |
|
1620 | + echo "DSN Message:<br />\n".$dsn_msg.$bmh_newline; |
|
1621 | 1621 | echo $bmh_newline; |
1622 | 1622 | } |
1623 | 1623 | } else { |
@@ -311,16 +311,16 @@ discard block |
||
311 | 311 | public function globalDelete(): bool |
312 | 312 | { |
313 | 313 | $dateArr = \explode('-', $this->deleteMsgDate); // date format is yyyy-mm-dd |
314 | - $delDate = \mktime(0, 0, 0, (int) ($dateArr[1]), (int) ($dateArr[2]), (int) ($dateArr[0])); |
|
314 | + $delDate = \mktime(0, 0, 0, (int)($dateArr[1]), (int)($dateArr[2]), (int)($dateArr[0])); |
|
315 | 315 | |
316 | - $port = $this->port . '/' . $this->service . '/' . $this->serviceOption; |
|
317 | - $mboxt = \imap_open('{' . $this->mailhost . ':' . $port . '}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN); |
|
316 | + $port = $this->port.'/'.$this->service.'/'.$this->serviceOption; |
|
317 | + $mboxt = \imap_open('{'.$this->mailhost.':'.$port.'}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN); |
|
318 | 318 | |
319 | 319 | if ($mboxt === false) { |
320 | 320 | return false; |
321 | 321 | } |
322 | 322 | |
323 | - $list = \imap_getmailboxes($mboxt, '{' . $this->mailhost . ':' . $port . '}', '*'); |
|
323 | + $list = \imap_getmailboxes($mboxt, '{'.$this->mailhost.':'.$port.'}', '*'); |
|
324 | 324 | |
325 | 325 | if (\is_array($list)) { |
326 | 326 | foreach ($list as $key => $val) { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | $nameRaw = $nameArr[\count($nameArr) - 1]; |
330 | 330 | |
331 | 331 | if (\stripos($nameRaw, 'sent') === false) { |
332 | - $mboxd = \imap_open('{' . $this->mailhost . ':' . $port . '}' . $nameRaw, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE); |
|
332 | + $mboxd = \imap_open('{'.$this->mailhost.':'.$port.'}'.$nameRaw, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE); |
|
333 | 333 | $messages = \imap_sort($mboxd, SORTDATE, 0); |
334 | 334 | |
335 | 335 | foreach ($messages as $message) { |
@@ -405,19 +405,19 @@ discard block |
||
405 | 405 | if (\trim($mailbox) === '') { |
406 | 406 | // this is a critical error with either the mailbox name blank or an invalid mailbox name |
407 | 407 | // need to stop processing and exit at this point |
408 | - echo 'Invalid mailbox name for move operation. Cannot continue: ' . $mailbox . "<br />\n"; |
|
408 | + echo 'Invalid mailbox name for move operation. Cannot continue: '.$mailbox."<br />\n"; |
|
409 | 409 | exit(); |
410 | 410 | } |
411 | 411 | |
412 | - $port = $this->port . '/' . $this->service . '/' . $this->serviceOption; |
|
412 | + $port = $this->port.'/'.$this->service.'/'.$this->serviceOption; |
|
413 | 413 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
414 | - $mbox = @\imap_open('{' . $this->mailhost . ':' . $port . '}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN); |
|
414 | + $mbox = @\imap_open('{'.$this->mailhost.':'.$port.'}', $this->mailboxUserName, $this->mailboxPassword, OP_HALFOPEN); |
|
415 | 415 | |
416 | 416 | if ($mbox === false) { |
417 | 417 | return false; |
418 | 418 | } |
419 | 419 | |
420 | - $list = \imap_getmailboxes($mbox, '{' . $this->mailhost . ':' . $port . '}', '*'); |
|
420 | + $list = \imap_getmailboxes($mbox, '{'.$this->mailhost.':'.$port.'}', '*'); |
|
421 | 421 | $mailboxFound = false; |
422 | 422 | |
423 | 423 | if (\is_array($list)) { |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | |
433 | 433 | if ($mailboxFound === false && $create) { |
434 | 434 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
435 | - @\imap_createmailbox($mbox, \imap_utf7_encode('{' . $this->mailhost . ':' . $port . '}' . $mailbox)); |
|
435 | + @\imap_createmailbox($mbox, \imap_utf7_encode('{'.$this->mailhost.':'.$port.'}'.$mailbox)); |
|
436 | 436 | /** @noinspection UnusedFunctionResultInspection */ |
437 | 437 | \imap_errors(); |
438 | 438 | /** @noinspection UnusedFunctionResultInspection */ |
@@ -478,13 +478,13 @@ discard block |
||
478 | 478 | } |
479 | 479 | |
480 | 480 | if (!$this->mailboxLink) { |
481 | - $this->errorMessage = 'Cannot open the mailbox file to ' . $filePath . $this->bmhNewLine . 'Error MSG: ' . \imap_last_error(); |
|
481 | + $this->errorMessage = 'Cannot open the mailbox file to '.$filePath.$this->bmhNewLine.'Error MSG: '.\imap_last_error(); |
|
482 | 482 | $this->output(); |
483 | 483 | |
484 | 484 | return false; |
485 | 485 | } |
486 | 486 | |
487 | - $this->output('Opened ' . $filePath); |
|
487 | + $this->output('Opened '.$filePath); |
|
488 | 488 | |
489 | 489 | return true; |
490 | 490 | } |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | { |
499 | 499 | // before starting the processing, let's check the delete flag and do global deletes if true |
500 | 500 | if (\trim($this->deleteMsgDate) !== '') { |
501 | - echo 'processing global delete based on date of ' . $this->deleteMsgDate . '<br />'; |
|
501 | + echo 'processing global delete based on date of '.$this->deleteMsgDate.'<br />'; |
|
502 | 502 | $this->globalDelete(); |
503 | 503 | } |
504 | 504 | |
@@ -508,24 +508,24 @@ discard block |
||
508 | 508 | $this->moveHard = false; |
509 | 509 | } |
510 | 510 | |
511 | - $port = $this->port . '/' . $this->service . '/' . $this->serviceOption; |
|
511 | + $port = $this->port.'/'.$this->service.'/'.$this->serviceOption; |
|
512 | 512 | |
513 | 513 | \set_time_limit(self::SECONDS_TIMEOUT); |
514 | 514 | |
515 | 515 | if (!$this->testMode) { |
516 | - $this->mailboxLink = \imap_open('{' . $this->mailhost . ':' . $port . '}' . $this->boxname, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE); |
|
516 | + $this->mailboxLink = \imap_open('{'.$this->mailhost.':'.$port.'}'.$this->boxname, $this->mailboxUserName, $this->mailboxPassword, CL_EXPUNGE); |
|
517 | 517 | } else { |
518 | - $this->mailboxLink = \imap_open('{' . $this->mailhost . ':' . $port . '}' . $this->boxname, $this->mailboxUserName, $this->mailboxPassword, OP_READONLY); |
|
518 | + $this->mailboxLink = \imap_open('{'.$this->mailhost.':'.$port.'}'.$this->boxname, $this->mailboxUserName, $this->mailboxPassword, OP_READONLY); |
|
519 | 519 | } |
520 | 520 | |
521 | 521 | if (!$this->mailboxLink) { |
522 | - $this->errorMessage = 'Cannot create ' . $this->service . ' connection to ' . $this->mailhost . $this->bmhNewLine . 'Error MSG: ' . \imap_last_error(); |
|
522 | + $this->errorMessage = 'Cannot create '.$this->service.' connection to '.$this->mailhost.$this->bmhNewLine.'Error MSG: '.\imap_last_error(); |
|
523 | 523 | $this->output(); |
524 | 524 | |
525 | 525 | return false; |
526 | 526 | } |
527 | 527 | |
528 | - $this->output('Connected to: ' . $this->mailhost . ' (' . $this->mailboxUserName . ')'); |
|
528 | + $this->output('Connected to: '.$this->mailhost.' ('.$this->mailboxUserName.')'); |
|
529 | 529 | |
530 | 530 | return true; |
531 | 531 | } |
@@ -540,9 +540,9 @@ discard block |
||
540 | 540 | { |
541 | 541 | if ($this->verbose >= $verboseLevel) { |
542 | 542 | if ($msg) { |
543 | - echo $msg . $this->bmhNewLine; |
|
543 | + echo $msg.$this->bmhNewLine; |
|
544 | 544 | } else { |
545 | - echo $this->errorMessage . $this->bmhNewLine; |
|
545 | + echo $this->errorMessage.$this->bmhNewLine; |
|
546 | 546 | } |
547 | 547 | } |
548 | 548 | } |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | break; |
629 | 629 | |
630 | 630 | default: // un-support Content-type |
631 | - $this->output('Msg #' . $pos . ' is unsupported Content-Type:' . $structure->type, self::VERBOSE_REPORT); |
|
631 | + $this->output('Msg #'.$pos.' is unsupported Content-Type:'.$structure->type, self::VERBOSE_REPORT); |
|
632 | 632 | |
633 | 633 | return false; |
634 | 634 | } |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | } |
676 | 676 | |
677 | 677 | if ($this->testMode) { |
678 | - $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email); |
|
678 | + $this->output('Match: '.$ruleNumber.':'.$ruleCategory.'; '.$bounceType.'; '.$email); |
|
679 | 679 | } else { |
680 | 680 | // code below will use the Callback function, but return no value |
681 | 681 | $params = [ |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | } else { |
701 | 701 | // match rule, do bounce action |
702 | 702 | if ($this->testMode) { |
703 | - $this->output('Match: ' . $ruleNumber . ':' . $ruleCategory . '; ' . $bounceType . '; ' . $email); |
|
703 | + $this->output('Match: '.$ruleNumber.':'.$ruleCategory.'; '.$bounceType.'; '.$email); |
|
704 | 704 | |
705 | 705 | return true; |
706 | 706 | } |
@@ -766,12 +766,12 @@ discard block |
||
766 | 766 | $unprocessedCount = 0; |
767 | 767 | $deletedCount = 0; |
768 | 768 | $movedCount = 0; |
769 | - $this->output('Total: ' . $totalCount . ' messages '); |
|
769 | + $this->output('Total: '.$totalCount.' messages '); |
|
770 | 770 | |
771 | 771 | // process maximum number of messages |
772 | 772 | if ($fetchedCount > $this->maxMessages) { |
773 | 773 | $fetchedCount = $this->maxMessages; |
774 | - $this->output('Processing first ' . $fetchedCount . ' messages '); |
|
774 | + $this->output('Processing first '.$fetchedCount.' messages '); |
|
775 | 775 | } |
776 | 776 | |
777 | 777 | if ($this->testMode) { |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | $processedResult = $this->processBounce($x, 'DSN', $totalCount); |
814 | 814 | } else { |
815 | 815 | // not standard DSN msg |
816 | - $this->output('Msg #' . $x . ' is not a standard DSN message', self::VERBOSE_REPORT); |
|
816 | + $this->output('Msg #'.$x.' is not a standard DSN message', self::VERBOSE_REPORT); |
|
817 | 817 | |
818 | 818 | if ($this->debugBodyRule) { |
819 | 819 | if ($structure->ifdescription) { |
@@ -839,7 +839,7 @@ discard block |
||
839 | 839 | $processedResult = $this->processBounce($x, 'DSN', $totalCount); |
840 | 840 | } else { |
841 | 841 | // not standard DSN msg |
842 | - $this->output('Msg #' . $x . ' is not a standard DSN message', self::VERBOSE_REPORT); |
|
842 | + $this->output('Msg #'.$x.' is not a standard DSN message', self::VERBOSE_REPORT); |
|
843 | 843 | |
844 | 844 | if ($this->debugBodyRule) { |
845 | 845 | $this->output(" Content-Type : {$match[1]}", self::VERBOSE_DEBUG); |
@@ -849,10 +849,10 @@ discard block |
||
849 | 849 | } |
850 | 850 | } else { |
851 | 851 | // didn't get content-type header |
852 | - $this->output('Msg #' . $x . ' is not a well-formatted MIME mail, missing Content-Type', self::VERBOSE_REPORT); |
|
852 | + $this->output('Msg #'.$x.' is not a well-formatted MIME mail, missing Content-Type', self::VERBOSE_REPORT); |
|
853 | 853 | |
854 | 854 | if ($this->debugBodyRule) { |
855 | - $this->output(' Headers: ' . $this->bmhNewLine . $header . $this->bmhNewLine, self::VERBOSE_DEBUG); |
|
855 | + $this->output(' Headers: '.$this->bmhNewLine.$header.$this->bmhNewLine, self::VERBOSE_DEBUG); |
|
856 | 856 | } |
857 | 857 | |
858 | 858 | $processedResult = $this->processBounce($x, 'BODY', $totalCount); |
@@ -883,7 +883,7 @@ discard block |
||
883 | 883 | // move the message |
884 | 884 | if (!$this->testMode) { |
885 | 885 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
886 | - @\imap_mail_move($this->mailboxLink, (string) $x, $this->hardMailbox); |
|
886 | + @\imap_mail_move($this->mailboxLink, (string)$x, $this->hardMailbox); |
|
887 | 887 | } |
888 | 888 | |
889 | 889 | $moveFlag[$x] = true; |
@@ -897,7 +897,7 @@ discard block |
||
897 | 897 | // move the message |
898 | 898 | if (!$this->testMode) { |
899 | 899 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
900 | - @\imap_mail_move($this->mailboxLink, (string) $x, $this->softMailbox); |
|
900 | + @\imap_mail_move($this->mailboxLink, (string)$x, $this->softMailbox); |
|
901 | 901 | } |
902 | 902 | |
903 | 903 | $moveFlag[$x] = true; |
@@ -921,25 +921,25 @@ discard block |
||
921 | 921 | $this->mailboxExist($this->unprocessedBox); |
922 | 922 | // move the message |
923 | 923 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
924 | - @\imap_mail_move($this->mailboxLink, (string) $x, $this->unprocessedBox); |
|
924 | + @\imap_mail_move($this->mailboxLink, (string)$x, $this->unprocessedBox); |
|
925 | 925 | $moveFlag[$x] = true; |
926 | 926 | } |
927 | 927 | |
928 | 928 | \flush(); |
929 | 929 | } |
930 | 930 | |
931 | - $this->output($this->bmhNewLine . 'Closing mailbox, and purging messages'); |
|
931 | + $this->output($this->bmhNewLine.'Closing mailbox, and purging messages'); |
|
932 | 932 | |
933 | 933 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
934 | 934 | @\imap_expunge($this->mailboxLink); |
935 | 935 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
936 | 936 | @\imap_close($this->mailboxLink); |
937 | 937 | |
938 | - $this->output('Read: ' . $fetchedCount . ' messages'); |
|
939 | - $this->output($processedCount . ' action taken'); |
|
940 | - $this->output($unprocessedCount . ' no action taken'); |
|
941 | - $this->output($deletedCount . ' messages deleted'); |
|
942 | - $this->output($movedCount . ' messages moved'); |
|
938 | + $this->output('Read: '.$fetchedCount.' messages'); |
|
939 | + $this->output($processedCount.' action taken'); |
|
940 | + $this->output($unprocessedCount.' no action taken'); |
|
941 | + $this->output($deletedCount.' messages deleted'); |
|
942 | + $this->output($movedCount.' messages moved'); |
|
943 | 943 | |
944 | 944 | return true; |
945 | 945 | } |