1
0
mirror of https://github.com/volatiletech/authboss.git synced 2024-11-28 08:58:38 +02:00
authboss/mailer.go
Aaron L cbfc1d8388 Fix authboss core tests
- Delete callbacks tests
- Remove some useless code (SendMail), as well as some extra arguments
  in certain functions that didn't require them.
- Remove tests for more code that has been moved to default
  implementations
2018-02-01 11:51:43 -08:00

26 lines
635 B
Go

package authboss
import (
"context"
)
// Mailer is a type that is capable of sending an e-mail.
type Mailer interface {
Send(context.Context, Email) error
}
// 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
}