From 8289fa9dba760089d7839f8103d81877822a6f68 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sun, 5 Feb 2023 23:14:29 -0700 Subject: pigeon: populate message content from EML over JSON --- message.eml.example | 2 +- pigeon.go | 3 --- pigeon.json.example | 3 +-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/message.eml.example b/message.eml.example index 041a56e..9f463c1 100644 --- a/message.eml.example +++ b/message.eml.example @@ -5,4 +5,4 @@ Date: {{.Date}} MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" -{{.Message}} +Message content goes here. diff --git a/pigeon.go b/pigeon.go index c169129..0ba8139 100644 --- a/pigeon.go +++ b/pigeon.go @@ -27,7 +27,6 @@ type Config struct { SMTPServer string `json:"smtp-server"` SMTPEmail string `json:"smtp-email"` SMTPPass string `json:"smtp-pass"` - Message string `json:"message"` Cooldown string `json:"cooldown"` IgnoreAlias bool `json:"ignore-alias"` } @@ -38,7 +37,6 @@ type Email struct { FromEmail string Subject string Date string - Message string } type worker struct { @@ -229,7 +227,6 @@ func (w *worker) handleUpdate(update *client.MailboxUpdate) { FromName: w.config.FromName, Subject: w.config.Subject, Date: time.Now().Format(time.RFC1123Z), - Message: w.config.Message, } if prevSend, exists := w.seen.emails[eml.ToEmail]; exists { log.Println("Address exists, checking time...") diff --git a/pigeon.json.example b/pigeon.json.example index dcd91e6..5f37875 100644 --- a/pigeon.json.example +++ b/pigeon.json.example @@ -9,6 +9,5 @@ "smtp-email": "john@example.com", "smtp-pass": "password", "cooldown": "24h", - "ignore-alias": true, - "message": "Hello,\r\n\r\nSorry I missed you!\r\n\r\nJohn", + "ignore-alias": true } -- cgit v1.2.3-54-g00ecf