From 4be253e48bf7859d650b5c91030045291329cfee Mon Sep 17 00:00:00 2001 From: Evan J Date: Tue, 13 Oct 2020 23:27:08 -0700 Subject: [PATCH] Feat(main.go): Trim whitespace from message. --- .gitignore | 1 + main.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..10f1720 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +ezmail diff --git a/main.go b/main.go index 0516ada..89146f0 100644 --- a/main.go +++ b/main.go @@ -10,6 +10,7 @@ import ( "log" "net/smtp" "os" + "strings" "text/template" ) @@ -69,7 +70,7 @@ func run(fromPass, fromAddr, fromDomain string, fromPort int, toAddr string, sub "From": fromAddr, "To": toAddr, "Subject": sub, - "Body": string(b), + "Body": strings.TrimSpace(string(b)), } ) -- 2.45.2