Exemple #1
0
			}))
		})

		Context("when in Testmode", func() {
			var msg mail.Message

			BeforeEach(func() {
				var err error

				mailServer.SupportsTLS = true
				config.Host, config.Port, err = net.SplitHostPort(mailServer.URL.String())
				if err != nil {
					panic(err)
				}

				config.TestMode = true
				client = mail.NewClient(config)

				msg = mail.Message{
					From:    "*****@*****.**",
					To:      "*****@*****.**",
					Subject: "Urgent! Read now!",
					Body: []mail.Part{
						{
							ContentType: "text/plain",
							Content:     "This email is the most important thing you will read all day!",
						},
					},
				}
			})