2015-01-17 07:49:23 +02:00
|
|
|
package authboss
|
|
|
|
|
|
|
|
import (
|
2017-02-21 01:56:26 +02:00
|
|
|
"context"
|
2015-01-17 07:49:23 +02:00
|
|
|
)
|
|
|
|
|
2015-01-26 01:40:57 +02:00
|
|
|
// Mailer is a type that is capable of sending an e-mail.
|
|
|
|
type Mailer interface {
|
2017-02-21 01:56:26 +02:00
|
|
|
Send(context.Context, Email) error
|
2015-01-26 01:40:57 +02:00
|
|
|
}
|
2015-01-17 07:49:23 +02:00
|
|
|
|
2015-01-26 01:40:57 +02: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-17 07:49:23 +02:00
|
|
|
}
|