Open gene1wood opened 3 years ago
It also doesn't work with non-mime based text emails like this
Return-Path: <mailfrom-sender@example.com>
Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232])
by inbound-smtp.us-west-2.amazonaws.com with SMTP id t0vgoot1robqagi0vffiahkdlp7ga86bseqic601
for support@tickets.example.com;
Mon, 28 Dec 2020 16:13:26 +0000 (UTC)
X-SES-Spam-Verdict: PASS
X-SES-Virus-Verdict: PASS
Received-SPF: pass (spfCheck: domain of example.com designates 217.70.178.232 as permitted sender) client-ip=217.70.178.232; envelope-from=mailfrom-sender@example.com; helo=relay12.mail.gandi.net;
Authentication-Results: amazonses.com;
spf=pass (spfCheck: domain of example.com designates 217.70.178.232 as permitted sender) client-ip=217.70.178.232; envelope-from=mailfrom-sender@example.com; helo=relay12.mail.gandi.net;
dmarc=none header.from=example.com;
X-SES-RECEIPT: AEFBQUFBQUFBQUFGZjRJSzBSbjY3aS93MkpkdCt3U0tYK0JNY1pjUzJpTDBSOTZ3a3o1dUVHVVdzOWdrbVRMbXNxTDhQcG5FbjFLV1M5YWlYZ1c5ZkczMjBrUGFlQU9nejFscWFjUXFsTGFxblUwU1FSOWpZYzBwUnJlU2VjNWxpaVJFVktZWWRxeTZIZDhCMUsreUUrTzNqaUk1eVRUZXQwNUxrbmxCdW1IeXhLL0F2b2xKZi9ZU3JrQ1BFMGU3dnozVFNKNVRSMXlDYVducXg2ckVXaVh1KzRuQU9DQnh0YTBQdlZNSmtwMU0wMUlqY1gvcDBCN041anVpL1E0RDVUdm1GM01PQnRWRmxDSXgwQzZvYlJ2MmM0aFJFbnl3RmNJMnc4WXlaOHl1aGs1a0pXbU11c1E9PQ==
X-SES-DKIM-SIGNATURE: a=rsa-sha256; q=dns/txt; b=FWh/VIAY+j8as5y3Dr7w++BevAppOsKkgIxkLkpwJ84kD/VVsn9p4ROrZkZ67e5sc71nwyRSVErvs85jmyEi3ca13IFITTX5vTjo4xPM7V5aX/08IXhRe7nHG0jotWH21b5s/aR90glWDKtHTJdIOVajTQ11IINCU04D6u0Oc9k=; c=relaxed/simple; s=hsbnp7p3ensaochzwyq5wwmceodymuwv; d=amazonses.com; t=1609172008; v=1; bh=/AUZkCgEqnJuCDZfukfatYPN2oAZlaDITyuqlGyYEqU=; h=From:To:Cc:Bcc:Subject:Date:Message-ID:MIME-Version:Content-Type:X-SES-RECEIPT;
Received: from spool.mail.gandi.net (spool4.mail.gandi.net [217.70.178.213])
by relay12.mail.gandi.net (Postfix) with ESMTPS id BA8E1200002
for <support@tickets.example.com>; Mon, 28 Dec 2020 16:13:24 +0000 (UTC)
Received: from srv1.msp.iocoop.org (srv1.msp.iocoop.org [204.246.122.3])
by spool.mail.gandi.net (Postfix) with ESMTPS id AA9C37804A5
for <support@example.com>; Mon, 28 Dec 2020 16:13:23 +0000 (UTC)
Received: by srv1.msp.iocoop.org (Postfix, from userid 33)
id B192BC424B; Mon, 28 Dec 2020 16:13:21 +0000 (UTC)
To: support@example.com
Subject: Here i my subject
X-PHP-Originating-Script: 1002:PHPMailer.php
Date: Mon, 28 Dec 2020 16:13:21 +0000
From: A senders name <noreply@example.com>
Reply-To: some-other-senderd@example.com
Message-ID: <zut8FDmAOvNVgFwEgNUqtTJJpP3s5tSGzjXgChSo@iocoop.org>
X-Mailer: PHPMailer 6.2.0 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-GND-Status: LEGIT
Received-SPF: pass (spool4: domain of example.com designates 204.246.122.3 as permitted sender) client-ip=204.246.122.3; envelope-from=mailfrom-sender@example.com; helo=srv1.msp.iocoop.org;
Body of email goes here
The new parsing from #37 doesn't appear to handle cases like this correctly (where there is only text and no html)