Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Container = &MailerContainer{}
)
Initialize a mailer container singleton instance
Functions ¶
func InitializeMailer ¶
InitializeMailer initializes the current mailer according to the config
Types ¶
type DefaultMailer ¶
type DefaultMailer struct {
// contains filtered or unexported fields
}
DefaultMailer represents default mailer
func NewDefaultMailer ¶
func NewDefaultMailer(smtpConfig *settings.SMTPConfig) (*DefaultMailer, error)
NewDefaultMailer returns a new default mailer
func (*DefaultMailer) SendMail ¶
func (m *DefaultMailer) SendMail(message *MailMessage) error
SendMail sends an email according to argument
type MailMessage ¶
MailMessage represents an email entity
type Mailer ¶
type Mailer interface {
SendMail(message *MailMessage) error
}
Mailer is email sender interface
type MailerContainer ¶
type MailerContainer struct {
Current Mailer
}
MailerContainer contains the current mailer
func (*MailerContainer) SendMail ¶
func (u *MailerContainer) SendMail(message *MailMessage) error
SendMail sends an email according to argument
Click to show internal directories.
Click to hide internal directories.