Documentation
¶
Index ¶
- type Client
- type Config
- type Content
- func NewRenderableHtmlContent(receiver string, subject string, template template.Template) Content
- func NewRenderableTextContent(receiver string, subject string, template template.Template) Content
- func NewStaticHtmlContent(receiver string, subject string, content string) Content
- func NewStaticTextContent(receiver string, subject string, content string) Content
- type DialSmtpServerError
- type InitMailContentError
- type RenderableContent
- type StaticContent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
SendContent(content Content) error
// contains filtered or unexported methods
}
func NewTLSClient ¶
type Config ¶
type Config struct {
Secret string `yaml:"secret,omitempty" json:"secret,omitempty" xml:"secret,omitempty"`
Server string `yaml:"server,omitempty" json:"server,omitempty" xml:"server,omitempty"`
Port int `yaml:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"`
Sender string `yaml:"sender,omitempty" json:"sender,omitempty" xml:"sender,omitempty"`
Signature string `yaml:"signature,omitempty" json:"signature,omitempty" xml:"signature,omitempty"`
EnableTLS bool `yaml:"enable_tls,omitempty" json:"enable_tls,omitempty" xml:"enable_tls,omitempty"`
}
type Content ¶
type Content interface {
ExportToMailText() []byte
// contains filtered or unexported methods
}
func NewStaticHtmlContent ¶
type DialSmtpServerError ¶
type DialSmtpServerError struct {
Err error
}
func NewDialSmtpServerError ¶
func NewDialSmtpServerError(err error) *DialSmtpServerError
func (*DialSmtpServerError) Error ¶
func (d *DialSmtpServerError) Error() string
type InitMailContentError ¶
func NewInitMailContentError ¶
func NewInitMailContentError(content []byte, err error) *InitMailContentError
func (*InitMailContentError) Error ¶
func (i *InitMailContentError) Error() string
type RenderableContent ¶
type RenderableContent struct {
// contains filtered or unexported fields
}
func (*RenderableContent) ExportToMailText ¶
func (c *RenderableContent) ExportToMailText() []byte
type StaticContent ¶
type StaticContent struct {
// contains filtered or unexported fields
}
func (*StaticContent) ExportToMailText ¶
func (c *StaticContent) ExportToMailText() []byte
Click to show internal directories.
Click to hide internal directories.