Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailSender ¶
type MailService ¶
type MailService struct {
FromEmail string
SMTPHost string
SMTPPort int
Username string
Password string
Mailer Mailer
DevMode bool
}
func NewMailService ¶
func NewTestMailService ¶
func NewTestMailService() *MailService
NewTestMailService creates a new MailService configured for testing
func (*MailService) SendEmail ¶
func (m *MailService) SendEmail(to, subject, body string) error
type TestMailer ¶
type TestMailer struct {
// contains filtered or unexported fields
}
TestMailer implements the Mailer interface for testing purposes
func NewTestMailer ¶
func NewTestMailer() *TestMailer
NewTestMailer creates a new TestMailer instance
func (*TestMailer) ClearEmails ¶
func (m *TestMailer) ClearEmails()
ClearEmails removes all stored emails
func (*TestMailer) DialAndSend ¶
func (m *TestMailer) DialAndSend(msgs ...*mail.Message) error
DialAndSend implements the Mailer interface by storing the email for later verification
func (*TestMailer) GetEmails ¶
func (m *TestMailer) GetEmails() []TestEmail
GetEmails returns all emails that have been "sent" through this mailer
Click to show internal directories.
Click to hide internal directories.