From 182cc1173011555aa4b534bb9918c1309e5873aa Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 7 Feb 2023 23:39:54 -0700 Subject: pigeon: move (all) message header directives to EML --- message.eml.example | 2 +- pigeon.go | 3 --- pigeon.json.example | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/message.eml.example b/message.eml.example index 9f463c1..aba0ca7 100644 --- a/message.eml.example +++ b/message.eml.example @@ -1,6 +1,6 @@ From: "{{.FromName}}" <{{.FromEmail}}> To: <{{.ToEmail}}> -Subject: {{.Subject}} +Subject: On vacation! Date: {{.Date}} MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" diff --git a/pigeon.go b/pigeon.go index 0ba8139..3788c9e 100644 --- a/pigeon.go +++ b/pigeon.go @@ -20,7 +20,6 @@ import ( type Config struct { FromEmail string `json:"from-email"` FromName string `json:"from-name"` - Subject string `json:"subject"` IMAPServer string `json:"imap-server"` IMAPEmail string `json:"imap-email"` IMAPPass string `json:"imap-pass"` @@ -35,7 +34,6 @@ type Email struct { ToEmail string FromName string FromEmail string - Subject string Date string } @@ -225,7 +223,6 @@ func (w *worker) handleUpdate(update *client.MailboxUpdate) { ToEmail: msg.Envelope.From[0].Address(), FromEmail: w.config.FromEmail, FromName: w.config.FromName, - Subject: w.config.Subject, Date: time.Now().Format(time.RFC1123Z), } if prevSend, exists := w.seen.emails[eml.ToEmail]; exists { diff --git a/pigeon.json.example b/pigeon.json.example index 5f37875..48e62fe 100644 --- a/pigeon.json.example +++ b/pigeon.json.example @@ -1,7 +1,6 @@ { "from-email": "john@example.com", "from-name": "John Doe", - "subject": "On vacation! :)", "imap-server": "example.com:993", "imap-email": "john@example.com", "imap-pass": "password", -- cgit v1.2.3-54-g00ecf