spewmail code, go fmt, some fiddly bits