This commit has been accessed 626 times via Git panel.
commit f95c8dc5b392042fdc9e4bf94b7fba7d4e875c8d
tree 40825aa1cd9c6ee66c92b34165e38c2231013633
parent 13d9e3a4a155d2557576797a39eec9c900a1ebd3
author Engels Antonio <engels@majcms.org> 1339759820 +0800
committer Engels Antonio <engels@majcms.org> 1339759820 +0800
Add sieve filter message body test
diff --git a/index.php b/index.php
index dbac353..a1a3dcf 100644
--- a/index.php
+++ b/index.php
@@ -1326,7 +1326,13 @@ echo "</tr>";
}
if ($sieveV != "") {
- $sieveW = "require \"fileinto\"; if header :contains \"$sieveT\" \"$sieveV\" { fileinto \"$sieveF\"; }";
+
+ if ($sieveT == "body") {
+ $sieveW = "require [\"fileinto\", \"body\"]; if body :contains \"$sieveV\" { fileinto \"$sieveF\"; }";
+ }
+ else {
+ $sieveW = "require \"fileinto\"; if header :contains \"$sieveT\" \"$sieveV\" { fileinto \"$sieveF\"; }";
+ }
}
if ($sieveW != ""){
@@ -1408,6 +1414,7 @@ echo "</tr>";
echo "<option value=\"from\">If message from contains</option>";
echo "<option value=\"to\">If message to contains</option>";
echo "<option value=\"cc\">If message cc contains</option>";
+ echo "<option value=\"body\">If message body contains</option>";
echo "</td>";
echo "<td><input class=\"input\" type=\"text\" name=\"sieveV\" autocomplete=\"off\" required></td>";
echo "<td><select class=\"input\" name=\"sieveF\"><option value=\"Trash\" selected>then move to Trash</option>";
tree 40825aa1cd9c6ee66c92b34165e38c2231013633
parent 13d9e3a4a155d2557576797a39eec9c900a1ebd3
author Engels Antonio <engels@majcms.org> 1339759820 +0800
committer Engels Antonio <engels@majcms.org> 1339759820 +0800
Add sieve filter message body test
diff --git a/index.php b/index.php
index dbac353..a1a3dcf 100644
--- a/index.php
+++ b/index.php
@@ -1326,7 +1326,13 @@ echo "</tr>";
}
if ($sieveV != "") {
- $sieveW = "require \"fileinto\"; if header :contains \"$sieveT\" \"$sieveV\" { fileinto \"$sieveF\"; }";
+
+ if ($sieveT == "body") {
+ $sieveW = "require [\"fileinto\", \"body\"]; if body :contains \"$sieveV\" { fileinto \"$sieveF\"; }";
+ }
+ else {
+ $sieveW = "require \"fileinto\"; if header :contains \"$sieveT\" \"$sieveV\" { fileinto \"$sieveF\"; }";
+ }
}
if ($sieveW != ""){
@@ -1408,6 +1414,7 @@ echo "</tr>";
echo "<option value=\"from\">If message from contains</option>";
echo "<option value=\"to\">If message to contains</option>";
echo "<option value=\"cc\">If message cc contains</option>";
+ echo "<option value=\"body\">If message body contains</option>";
echo "</td>";
echo "<td><input class=\"input\" type=\"text\" name=\"sieveV\" autocomplete=\"off\" required></td>";
echo "<td><select class=\"input\" name=\"sieveF\"><option value=\"Trash\" selected>then move to Trash</option>";