Documentation ¶
Overview ¶
Package notify provides email sender
Package notify providers error delivery via email
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Email ¶
type Email struct { SMTPClient EmailParams }
Email implements sender interface for VerifyHandler Uses common subject line and "from" for all messages
func NewEmailClient ¶
func NewEmailClient(p EmailParams) *Email
NewEmailClient creates email client with prepared smtp
func (*Email) IsOnCompletion ¶
IsOnCompletion status enabling on-passed notification
type EmailParams ¶
type EmailParams struct { Host string // SMTP host Port int // SMTP port From string // From email field ContentType string // Content type, optional. Will trigger MIME and Content-Type headers To []string TLS bool // TLS auth SMTPUserName string // user name SMTPPassword string // password TimeOut time.Duration OnError bool OnCompletion bool }
EmailParams with all needed to make new Email client with smtp
type SMTPClient ¶
type SMTPClient interface { Mail(string) error Auth(smtp.Auth) error Rcpt(string) error Data() (io.WriteCloser, error) Quit() error Close() error }
SMTPClient interface defines subset of net/smtp used by email client
type Service ¶ added in v0.2.0
type Service struct { *Email // contains filtered or unexported fields }
Service warps email client and template management
func NewService ¶ added in v0.2.0
NewService makes notification service with optional template files
func (Service) MakeCompletionHTML ¶ added in v0.2.0
MakeCompletionHTML creates error html body from completionTemplate
Click to show internal directories.
Click to hide internal directories.