Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnknownDriver = errors.New("unknown driver")
)
Functions ¶
This section is empty.
Types ¶
type ContentType ¶
type ContentType int
Content-Type of the email body.
const ( ContentTypePlainText ContentType = iota ContentTypeHTML )
func (ContentType) String ¶
func (c ContentType) String() string
type Mail ¶
type Mail struct { // Subject of the email. Subject string // Content type of the message body. Defaults to text/plain. ContentType ContentType // Buffer for the message body. bytes.Buffer }
Mail is a concrete representation of an email. Mail has embedded bytes.Buffer to read/write the message body.
type Mailer ¶
type Mailer struct {
// contains filtered or unexported fields
}
func NewMailer ¶
func NewMailer(d Driver, opts ...MailerOptionFn) *Mailer
NewMailer is intended for use by drivers only. Do not use in application code.
type MailerOptionFn ¶
type MailerOptionFn func(m *Mailer)
func DefaultFrom ¶
func DefaultFrom(from mail.Address) MailerOptionFn
DefaultFrom sets an default email address for From property.
Click to show internal directories.
Click to hide internal directories.