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

		Context("when optional fields are present", func() {
			It("includes Reply-To in message body", func() {
				msg.ReplyTo = "*****@*****.**"
				parts := strings.Split(msg.Data(), "\n")
				boundary := msg.Boundary()

				Expect(parts).To(ConsistOf([]string{
					"From: [email protected]",
					"Reply-To: [email protected]",
					"To: [email protected]",
					"Subject: Super Urgent! Read Now!",
					"Content-Type: multipart/alternative; boundary=" + boundary,
					"Date: " + time.Now().Format(time.RFC822Z),
					"Mime-Version: 1.0",
					"",
					"--" + boundary,
					"Content-Type: text/plain; charset=UTF-8",
					"Content-Transfer-Encoding: quoted-printable",