Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Upstream ¶
type Upstream interface { // Send sends multiple emails to multiple clients Send(ctx context.Context, templateName string, tsv *models.Template, request *models.SendRequest) (resp *models.SendResponse, err error) // SimpleSend sends email to one client SimpleSend(ctx context.Context, templateName string, tsv *models.Template, recipient *models.Recipient) (status *models.SendStatus, err error) CheckStatus() (err error) }
Upstream is interface for sending email
func NewDummyUpstream ¶
func NewDummyUpstream() Upstream
NewDummyUpstream returns a new dummy email upstream. It actually does nothing, only logs actions
func NewMailgun ¶
func NewMailgun(conn mailgun.Mailgun, msgStorage storages.MessagesStorage, senderName, senderMail string) Upstream
NewMailgun returns mail upstream which uses "Mailgun" service to send emails.
func NewSMTPUpstream ¶
func NewSMTPUpstream(msgStorage storages.MessagesStorage, senderName string, senderMail string, smtpAddress string, smtpLogin string, smtpPassword string) Upstream
NewSMTPUpstream returns mail upstream which uses SMTP service to send emails.
Click to show internal directories.
Click to hide internal directories.