small pixel drawing of a pufferfish clist

Add buildCommandEmail
Aedric Donovan aedric@c3f.net
Fri, 15 Nov 2019 12:46:29 -0600
commit

db0d7b700b936bf383ef1a6d61ab578b4ccad95b

parent

3b1a5e397e36b8ffcd84eb121d61ed2103608b3a

1 files changed, 14 insertions(+), 0 deletions(-)

jump to
M main.gomain.go

@@ -270,6 +270,20 @@ }

return false } +func buildCommandEmail(e *email.Email, t string) *email.Email { + email := email.NewEmail() + email.Sender = gConfig.CommandAddress + email.From = "<" + gConfig.CommandAddress + ">" + email.To = []string{e.From} + email.Recipients = []string{e.From} + email.Subject = e.Subject + email.Text = []byte(t) + email.Headers["Date"] = []string{time.Now().Format("Mon, 2 Jan 2006 15:04:05 -0700")} + email.Headers["Precedence"] = []string{"list"} + email.Headers["List-Help"] = []string{"<mailto:" + gConfig.CommandAddress + "?subject=help>"} + return email +} + func buildListEmail(e *email.Email, l *List) *email.Email { addresses := []string{} m, _ := mail.ParseAddress(e.From)