From 5ef8eee28b1737065d8e16882e9d66f1b27aa755 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 12 Nov 2021 08:29:01 +0100 Subject: [PATCH] Added Zoho recognition --- .../java/eu/faircode/email/MessageHelper.java | 20 +++- app/src/main/res/drawable/infra_zoho.xml | 94 +++++++++++++++++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 110 insertions(+), 5 deletions(-) create mode 100644 app/src/main/res/drawable/infra_zoho.xml diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 570cd592b5..9fff4d920d 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -1716,10 +1716,6 @@ public class MessageHelper { if (!TextUtils.isEmpty(zeptomail)) return "zeptomail"; - String xmailer = imessage.getHeader("X-Mailer", null); - if (!TextUtils.isEmpty(xmailer) && xmailer.contains("PHPMailer")) - return "phpmailer"; - String gmail = imessage.getHeader("X-Gm-Message-State", null); if (!TextUtils.isEmpty(gmail)) return "gmail"; @@ -1733,9 +1729,23 @@ public class MessageHelper { return "yahoo"; String icloud = imessage.getHeader("X-Proofpoint-Spam-Details", null); - if (!TextUtils.isEmpty(icloud)) // X-Mailer: iPhone Mail ... + if (!TextUtils.isEmpty(icloud)) return "icloud"; + String zoho = imessage.getHeader("X-ZohoMailClient", null); + if (!TextUtils.isEmpty(zoho)) + return "zoho"; + + String xmailer = imessage.getHeader("X-Mailer", null); + if (!TextUtils.isEmpty(xmailer)) { + if (xmailer.contains("iPhone Mail")) + return "icloud"; + if (xmailer.contains("PHPMailer")) + return "phpmailer"; + if (xmailer.contains("Zoho Mail")) + return "zoho"; + } + return null; } diff --git a/app/src/main/res/drawable/infra_zoho.xml b/app/src/main/res/drawable/infra_zoho.xml new file mode 100644 index 0000000000..2233c0aa04 --- /dev/null +++ b/app/src/main/res/drawable/infra_zoho.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 482668402b..13d26c9088 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1827,6 +1827,7 @@ Sparkpost Yahoo! Zeptomail/Zoho + Zoho Always