Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MGMailService ¶
type MGMailService struct {
// contains filtered or unexported fields
}
SGMailService is the sendgrid implementation of our MailService.
func NewMGMailService ¶
func NewMGMailService(logger hclog.Logger, configs *utils.Configurations) *MGMailService
NewMGMailService returns a new instance of MGMailService
func (*MGMailService) CreateMail ¶
func (ms *MGMailService) CreateMail(mailReq *Mail) []byte
CreateMail takes in a mail request and constructs mail type.
func (*MGMailService) NewMail ¶
func (ms *MGMailService) NewMail(from string, to []string, subject string, mailType Type, data *Data) *Mail
NewMail returns a new mail request.
func (*MGMailService) SendMail ¶
func (ms *MGMailService) SendMail(mailReq *Mail) error
SendMail creates a sendgrid mail from the given mail request and sends it.
type Mail ¶
type Mail struct {
// contains filtered or unexported fields
}
Mail represents a email request
type SGMailService ¶
type SGMailService struct {
// contains filtered or unexported fields
}
SGMailService is the sendgrid implementation of our MailService.
func NewSGMailService ¶
func NewSGMailService(logger hclog.Logger, configs *utils.Configurations) *SGMailService
NewSGMailService returns a new instance of SGMailService
func (*SGMailService) CreateMail ¶
func (ms *SGMailService) CreateMail(mailReq *Mail) []byte
CreateMail takes in a mail request and constructs a sendgrid mail type.
func (*SGMailService) NewMail ¶
func (ms *SGMailService) NewMail(from string, to []string, subject string, mailType Type, data *Data) *Mail
NewMail returns a new mail request.
func (*SGMailService) SendMail ¶
func (ms *SGMailService) SendMail(mailReq *Mail) error
SendMail creates a sendgrid mail from the given mail request and sends it.