Documentation ¶
Index ¶
Constants ¶
View Source
const ( ContentTypePlaintext = "text/plain" ContentTypeHTML = "text/html" )
Content Type
Variables ¶
View Source
var ( ErrNoMessage = fmt.Errorf("Mailer: No message to be sent") ErrNoRecipient = fmt.Errorf("Mailer: No email recipient") )
Mailer error
Functions ¶
This section is empty.
Types ¶
type GomailAdapter ¶
type GomailAdapter struct {
// contains filtered or unexported fields
}
GomailAdapter is a concrete struct of gomail adapter.
type GomailDialer ¶
type GomailDialer interface {
DialAndSend(m ...*gomail.Message) error
}
GomailDialer is an abstraction of gomail.Dialer.
type Mailer ¶
Mailer is collection of behavior of mailer.
func NewGomailAdapter ¶
func NewGomailAdapter(logger *logrus.Logger, defaultSender string, dialer GomailDialer, active bool) Mailer
NewGomailAdapter is a constructor.
type Message ¶
type Message struct { From string To []Recepient CC []Recepient Subject string MessageBody MessageBody }
Message is a message to be sent to the mail server.
type MessageBody ¶
MessageBody is the message body and the content type.
Click to show internal directories.
Click to hide internal directories.