From 6c6a0c35ed81159ff5e341c5c773d33d74e48128 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Sat, 14 Jan 2017 22:29:50 +0000 Subject: [PATCH] Display raw HTML as well as plain text In some cases, links may be not shown in the text, but are available in the HTML form of the email. Not entirely sure whether Mailinator's JSON will always contain this part, e.g. if an email is plain text only. --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index a141ba3..bc22339 100644 --- a/main.go +++ b/main.go @@ -121,8 +121,10 @@ func getMail(latestMsg publicMsg, cookies []*http.Cookie) error { fmt.Println("\nFrom :", mailMessage.Data.From) fmt.Println("Subject:", mailMessage.Data.Subject) - fmt.Println() + fmt.Println("Plain text:") fmt.Println(mailMessage.Data.Parts[0].Body) + fmt.Println("HTML:") + fmt.Println(mailMessage.Data.Parts[1].Body) return nil }