2015-01-16 21:49:23 -08:00
|
|
|
package authboss
|
|
|
|
|
|
|
|
import (
|
2017-02-20 15:56:26 -08:00
|
|
|
"context"
|
2015-01-16 21:49:23 -08:00
|
|
|
)
|
|
|
|
|
2015-01-25 15:40:57 -08:00
|
|
|
// Mailer is a type that is capable of sending an e-mail.
|
|
|
|
type Mailer interface {
|
2017-02-20 15:56:26 -08:00
|
|
|
Send(context.Context, Email) error
|
2015-01-25 15:40:57 -08:00
|
|
|
}
|
2015-01-16 21:49:23 -08:00
|
|
|
|
2015-01-25 15:40:57 -08:00
|
|
|
// Email all the things. The ToNames and friends are parallel arrays and must
|
|
|
|
// be 0-length or the same length as their counterpart. To omit a name
|
|
|
|
// for a user at an index in To simply use an empty string at that
|
|
|
|
// index in ToNames.
|
|
|
|
type Email struct {
|
|
|
|
To, Cc, Bcc []string
|
|
|
|
ToNames, CcNames, BccNames []string
|
|
|
|
FromName, From string
|
|
|
|
ReplyToName, ReplyTo string
|
|
|
|
Subject string
|
|
|
|
|
|
|
|
TextBody string
|
|
|
|
HTMLBody string
|
2015-01-16 21:49:23 -08:00
|
|
|
}
|