Versions in this module Expand all Collapse all v0 v0.1.0 Sep 17, 2019 v0.0.0 Jul 1, 2019 Changes in this version + var ErrAttachmentAlreadySet = errors.New("attachment already exists") + var ErrMissingFromField = errors.New("'from' field not set") + var ErrMissingToField = errors.New("'to' field not set") + type Attachment struct + Content []byte + Filename string + Header textproto.MIMEHeader + type HTMLEmail struct + From string + HtmlBody string + ReplyTo string + Subject string + TextBody string + To []string + func (e *HTMLEmail) Compile() ([]byte, error) + func (e *HTMLEmail) Recipients() []string + func (e *HTMLEmail) Sender() string + func (e *HTMLEmail) String() string + type Message interface + Compile func() ([]byte, error) + Recipients func() []string + Sender func() string + type MessageMock struct + CompileMock mMessageMockCompile + RecipientsMock mMessageMockRecipients + SenderMock mMessageMockSender + func NewMessageMock(t minimock.Tester) *MessageMock + func (m *MessageMock) MinimockCompileDone() bool + func (m *MessageMock) MinimockCompileInspect() + func (m *MessageMock) MinimockFinish() + func (m *MessageMock) MinimockRecipientsDone() bool + func (m *MessageMock) MinimockRecipientsInspect() + func (m *MessageMock) MinimockSenderDone() bool + func (m *MessageMock) MinimockSenderInspect() + func (m *MessageMock) MinimockWait(timeout mm_time.Duration) + func (mmCompile *MessageMock) Compile() (ba1 []byte, err error) + func (mmCompile *MessageMock) CompileAfterCounter() uint64 + func (mmCompile *MessageMock) CompileBeforeCounter() uint64 + func (mmRecipients *MessageMock) Recipients() (sa1 []string) + func (mmRecipients *MessageMock) RecipientsAfterCounter() uint64 + func (mmRecipients *MessageMock) RecipientsBeforeCounter() uint64 + func (mmSender *MessageMock) Sender() (s1 string) + func (mmSender *MessageMock) SenderAfterCounter() uint64 + func (mmSender *MessageMock) SenderBeforeCounter() uint64 + type MessageMockCompileExpectation struct + Counter uint64 + type MessageMockCompileResults struct + type MessageMockRecipientsExpectation struct + Counter uint64 + type MessageMockRecipientsResults struct + type MessageMockSenderExpectation struct + Counter uint64 + type MessageMockSenderResults struct + type SMTPAuth interface + type SMTPAuthMock struct + NextMock mSMTPAuthMockNext + StartMock mSMTPAuthMockStart + func NewSMTPAuthMock(t minimock.Tester) *SMTPAuthMock + func (m *SMTPAuthMock) MinimockFinish() + func (m *SMTPAuthMock) MinimockNextDone() bool + func (m *SMTPAuthMock) MinimockNextInspect() + func (m *SMTPAuthMock) MinimockStartDone() bool + func (m *SMTPAuthMock) MinimockStartInspect() + func (m *SMTPAuthMock) MinimockWait(timeout mm_time.Duration) + func (mmNext *SMTPAuthMock) Next(fromServer []byte, more bool) (toServer []byte, err error) + func (mmNext *SMTPAuthMock) NextAfterCounter() uint64 + func (mmNext *SMTPAuthMock) NextBeforeCounter() uint64 + func (mmStart *SMTPAuthMock) Start(server *smtp.ServerInfo) (proto string, toServer []byte, err error) + func (mmStart *SMTPAuthMock) StartAfterCounter() uint64 + func (mmStart *SMTPAuthMock) StartBeforeCounter() uint64 + type SMTPAuthMockNextExpectation struct + Counter uint64 + func (e *SMTPAuthMockNextExpectation) Then(toServer []byte, err error) *SMTPAuthMock + type SMTPAuthMockNextParams struct + type SMTPAuthMockNextResults struct + type SMTPAuthMockStartExpectation struct + Counter uint64 + func (e *SMTPAuthMockStartExpectation) Then(proto string, toServer []byte, err error) *SMTPAuthMock + type SMTPAuthMockStartParams struct + type SMTPAuthMockStartResults struct + type SMTPSender struct + func (s *SMTPSender) Send(m Message) error + type SMTPSenderOptions struct + Address string + Auth SMTPAuth + SendMailFunc SendMailFunc + type SendMailFunc func(addr string, a smtp.Auth, from string, to []string, msg []byte) error + type Sender interface + Send func(Message) error + func NewSMTPSender(options SMTPSenderOptions) Sender + type SenderMock struct + SendMock mSenderMockSend + func NewSenderMock(t minimock.Tester) *SenderMock + func (m *SenderMock) MinimockFinish() + func (m *SenderMock) MinimockSendDone() bool + func (m *SenderMock) MinimockSendInspect() + func (m *SenderMock) MinimockWait(timeout mm_time.Duration) + func (mmSend *SenderMock) Send(m1 Message) (err error) + func (mmSend *SenderMock) SendAfterCounter() uint64 + func (mmSend *SenderMock) SendBeforeCounter() uint64 + type SenderMockSendExpectation struct + Counter uint64 + func (e *SenderMockSendExpectation) Then(err error) *SenderMock + type SenderMockSendParams struct + type SenderMockSendResults struct + type TextEmail struct + Attachments map[string]*Attachment + Body string + From string + ReplyTo string + Subject string + To []string + func (e *TextEmail) Attach(filename string, content io.Reader) error + func (e *TextEmail) Compile() ([]byte, error) + func (e *TextEmail) Recipients() []string + func (e *TextEmail) Sender() string + func (e *TextEmail) String() string