Add Message-ID filter to email log
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 13 Aug 2021 13:52:11 +0000 (15:52 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 13 Aug 2021 13:52:11 +0000 (15:52 +0200)
wcfsetup/install/files/acp/templates/emailLogList.tpl
wcfsetup/install/files/lib/acp/page/EmailLogListPage.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index d230f763a0310d125c0eaf839855acc9ff5a1fac..e41b7a49608657a2f12244815ce7968a22bff0a4 100644 (file)
                        </dl>
                </div>
 
+               <div class="row rowColGap formGrid">
+                       <dl class="col-xs-12 col-md-8">
+                               <dt></dt>
+                               <dd>
+                                       <input
+                                               class="long"
+                                               name="filter[messageId]"
+                                               placeholder="{lang}wcf.acp.email.log.messageId{/lang}"
+                                               type="text"
+                                               value="{$filter[messageId]}"
+                                       >
+                               </dd>
+                       </dl>
+               </div>
+
                <div class="formSubmit">
                        <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s">
                </div>
index 47d53540c77b58630911c8f80abec67caa1bc610..56433ccca6ee06c9e4e448d95c8a0e7cd2b66e93 100644 (file)
@@ -63,6 +63,7 @@ class EmailLogListPage extends SortablePage
         'username' => null,
         'status' => null,
         'email' => null,
+        'messageId' => null,
     ];
 
     /**
@@ -112,6 +113,12 @@ class EmailLogListPage extends SortablePage
                 $this->objectList->getConditionBuilder()->add('recipient = ?', [$this->filter['email']]);
             }
         }
+        if (!empty($this->filter['messageId'])) {
+            $this->objectList->getConditionBuilder()->add(
+                'messageID LIKE ?',
+                ['%' . $this->filter['messageId'] . '%']
+            );
+        }
     }
 
     /**
index 7e6d72609be88f78e8983c3c399129f93bf9ee15..cd9d92a4f9e4c8c9e0b2048847c86cb50ef46e6b 100644 (file)
                <item name="wcf.acp.email.log"><![CDATA[Versendete E-Mails]]></item>
                <item name="wcf.acp.email.log.subject"><![CDATA[Betreff]]></item>
                <item name="wcf.acp.email.log.time"><![CDATA[Erzeugt]]></item>
+               <item name="wcf.acp.email.log.messageId"><![CDATA[Message-ID]]></item>
                <item name="wcf.acp.email.log.status"><![CDATA[Status]]></item>
                <item name="wcf.acp.email.log.status.success"><![CDATA[Versand erfolgt]]></item>
                <item name="wcf.acp.email.log.status.transient_failure"><![CDATA[Vorübergehendes Problem]]></item>
index 05dd51ca64e097dcd753a7fa77e284bc838edc3c..90ec1b6219faa2343f3b182cbd3a367169e20c0a 100644 (file)
                <item name="wcf.acp.email.log"><![CDATA[Emails Sent]]></item>
                <item name="wcf.acp.email.log.subject"><![CDATA[Subject]]></item>
                <item name="wcf.acp.email.log.time"><![CDATA[Created]]></item>
+               <item name="wcf.acp.email.log.messageId"><![CDATA[Message-ID]]></item>
                <item name="wcf.acp.email.log.status"><![CDATA[Status]]></item>
                <item name="wcf.acp.email.log.status.success"><![CDATA[Sent]]></item>
                <item name="wcf.acp.email.log.status.transient_failure"><![CDATA[Transient Failure]]></item>