aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2023-02-07 23:39:54 -0700
committerJordan <me@jordan.im>2023-02-07 23:39:54 -0700
commit182cc1173011555aa4b534bb9918c1309e5873aa (patch)
treee2cb280a46c4ea947f2a4f822cf31057475f0c81
parent8289fa9dba760089d7839f8103d81877822a6f68 (diff)
downloadpigeon-master.tar.gz
pigeon-master.zip
pigeon: move (all) message header directives to EMLHEADmaster
-rw-r--r--message.eml.example2
-rw-r--r--pigeon.go3
-rw-r--r--pigeon.json.example1
3 files changed, 1 insertions, 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",