From 638b60bafd724fd41b5c1ba6cff30f5f7a02b231 Mon Sep 17 00:00:00 2001 From: yumu <43062104+yumusb@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:41:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=88=86=E4=B8=A4=E4=B8=AA=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E7=9A=84to?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 区分两个不同的to --- main.go | 8 +++++++- test.go | 0 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test.go diff --git a/main.go b/main.go index e414e67..8ac9fee 100644 --- a/main.go +++ b/main.go @@ -134,7 +134,13 @@ func (s *Session) Data(r io.Reader) error { logrus.Errorf("Failed to parse email: %v - UUID: %s", err, s.UUID) return err } - logrus.Infof("Received email: From=%s To=%s Subject=%s - UUID: %s", env.GetHeader("From"), env.GetHeader("To"), env.GetHeader("Subject"), s.UUID) + logrus.Infof("Received email: From=%s HeaderTo=%s ParsedTo=%v Subject=%s - UUID: %s", + env.GetHeader("From"), + env.GetHeader("To"), + s.to, + env.GetHeader("Subject"), + s.UUID) + var attachments []string for _, attachment := range env.Attachments { disposition := attachment.Header.Get("Content-Disposition") diff --git a/test.go b/test.go new file mode 100644 index 0000000..e69de29