Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
ContentType string `json:"contentType"`
Name string `json:"name"`
Filename string `json:"filename"`
Data string `json:"data"`
}
func (Attachment) Validate ¶
func (a Attachment) Validate(v *jug.Validator)
type Config ¶
type Config struct {
Host string `yaml:"host"`
ApiKey string `yaml:"apiKey"`
Smtp SenderConfig `yaml:"smtp"`
}
type Email ¶
type Email struct {
From Address `json:"from"`
To Address `json:"to"`
Cc []Address `json:"cc"`
Bcc []Address `json:"bcc"`
Subject string `json:"subject"`
ContentType string `json:"contentType"`
Content string `json:"content"`
TextContent string `json:"textContent"`
HtmlContent string `json:"htmlContent"`
Attachments []Attachment `json:"attachments"`
}
func (Email) HasAttachments ¶
func (Email) IsAlternativeMail ¶
func (Email) IsHtmlMail ¶
func (Email) IsTextMail ¶
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
func NewSender ¶
func NewSender(config SenderConfig) *Sender
type SenderConfig ¶
type SenderConfig struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Tls bool `yaml:"tls"`
Username string `yaml:"username"`
Password string `yaml:"password"`
}
func (SenderConfig) Address ¶
func (c SenderConfig) Address() string
func (SenderConfig) Auth ¶
func (c SenderConfig) Auth() smtp.Auth
Click to show internal directories.
Click to hide internal directories.