Documentation ¶
Index ¶
Constants ¶
View Source
const ServiceName = "smtp"
ServiceName defines the name of smtp service used for dependency injection
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Email ¶
type Email struct { // From is the name of the sender // If empty the config flag 'smtp_from' is used From string To string Subject string BodyPlain string BodyHTML string Attachements []EmailAttachement }
Email defines the base model of an email
type EmailAttachement ¶
EmailAttachement defines the base model of an email attachemet
type MockService ¶
type MockService struct { gousu.MockService SendEmailFunc func(m *Email) error SendEmailFuncCalled int }
MockService for simply mocking IService
func NewMockService ¶
func NewMockService() *MockService
NewMockService creates a new initialized instance of MockService
func (*MockService) SendEmail ¶
func (s *MockService) SendEmail(m *Email) error
SendEmail calls SendEmailFunc and increases SendEmailFuncCalled
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides an smtp sender running in a separate thread
Click to show internal directories.
Click to hide internal directories.