all repos — mdawh @ 0ff2bd53b5bc2ea01735370c0f61c9598e7c3e11

An MDA that creates a webhook on recieval of mail

Log to file
Anirudh Oppiliappan x@icyphox.sh
Sat, 03 Apr 2021 18:55:19 +0530
commit

0ff2bd53b5bc2ea01735370c0f61c9598e7c3e11

parent

2f01a226cb575ccf8711b053399fa05df8023a73

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

jump to
M main.gomain.go

@@ -35,6 +35,13 @@ defer res.Body.Close()

} func main() { + f, err := os.OpenFile("mdawh.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) + if err != nil { + log.Fatal(err) + } + defer f.Close() + log.SetOutput(f) + r := bufio.NewReader(os.Stdin) mr, err := mail.CreateReader(r)