Add exceptions for non text/html content types
Anirudh Oppiliappan x@icyphox.sh
Thu, 04 Nov 2021 11:24:49 +0530
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
main.go
→
main.go
@@ -38,7 +38,7 @@ log.Printf("reader fetch: %v\n", err)
} article, err := reader.Readable(resp.Body, parsedURL) - if (err == nil) && (resp.MIMEType == "text/html") { + if (err == nil) && (resp.MIMEType == "text/html" || resp.MIMEType == "text/plain" || resp.MIMEType == "html") { err = mail.SendArticle(&article, m.From, true) if err != nil { log.Printf("error sending mail to: %s: %v\n", m.From, err)