Пример #1
0
					"",
					"Banana",
					"--" + boundary,
					"Content-Type: text/html; charset=UTF-8",
					"Content-Transfer-Encoding: quoted-printable",
					"",
					"<header>banana</header>",
					"--" + boundary + "--",
					"",
				}))
			})

			It("includes only the parts necessary", func() {
				msg.Body = []mail.Part{
					{
						ContentType: "text/html",
						Content:     "<header>banana</header>",
					},
				}

				parts := strings.Split(msg.Data(), "\n")

				Expect(parts).To(Equal([]string{
					"Date: " + time.Now().Format(time.RFC822Z),
					"Mime-Version: 1.0",
					"Content-Type: text/html; charset=UTF-8",
					"Content-Transfer-Encoding: quoted-printable",
					"From: [email protected]",
					"To: [email protected]",
					"Subject: Super Urgent! Read Now!",
					"",
					"<header>banana</header>",