Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrLimitMessagesReached = errors.New("ERR_LIMIT_REACHED") ErrServerError = errors.New("ERR_INTERNAL_ERROR") ErrInvalidDomain = errors.New("ERR_INVALID_DOMAIN") ErrInvalidAPIKey = errors.New("ERR_INVALID_APIKEY") ErrInvalidMessage = errors.New("ERR_INVALID_MESSAGE") ErrUnknownProvider = errors.New("ERR_UNKNOWN_PROVIDER") ErrInvalidProviders = errors.New("ERR_INVALID_PROVIDERS") ErrInvalidPublicAPIKey = errors.New("ERR_INVALID_PUBAPIKEY") ErrLimitDailyMessages = errors.New("ERR_DAILY_LIMIT_APIKEY") ErrAllLimitsReached = errors.New("ERR_ALL_LIMITS_REACHED") ErrInvalidSender = errors.New("ERR_INVALID_SENDER") ErrInvalidContent = errors.New("ERR_INVALID_CONTENT") ErrInvalidTemplate = errors.New("ERR_INVALID_TEMPLATE") ErrInvalidAttachment = errors.New("ERR_INVALID_ATTACHMENT") ErrInvalidRecipients = errors.New("ERR_INVALID_RECIPIENTS") )
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { Type string `json:"type,omitempty"` Content string `json:"content,omitempty"` Filename string `json:"filename,omitempty"` Filepath string `json:"filepath,omitempty"` }
Attachment struct provide basic attachment information
func (*Attachment) SetContent ¶
func (a *Attachment) SetContent(content string)
SetContent set a information about attachment
func (*Attachment) SetFilename ¶
func (a *Attachment) SetFilename(filename string)
SetFilename set a name for attachment
func (*Attachment) SetFilepath ¶
func (a *Attachment) SetFilepath(filepath string)
SetFilepath set the attachment location path
type Email ¶
type Email struct { ID int64 `json:"id,omitempty"` Sender *Sender `json:"sender,omitempty"` Subject *string `json:"subject,omitempty"` Content []*Content `json:"content,omitempty"` Attachments []*Attachment `json:"attachments,omitempty"` Recipients *Recipients `json:"recipients,omitempty"` Template *Template `json:"template,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` SendedAt time.Time `json:"sended_at,omitempty"` }
EEmail struct provide plain email information
type Provider ¶
type Provider interface {
// contains filtered or unexported methods
}
interface provider
type Recipients ¶
type Recipients struct { To []string `json:"to,omitempty"` CC []string `json:"cc,omitempty"` BCC []string `json:"bcc,omitempty"` }
Content struct provide all recipients email information
func NewRecipients ¶
func NewRecipients() *Recipients
NewRecipients creates a new recipients struct with empty list
func (*Recipients) AddBCCs ¶
func (r *Recipients) AddBCCs(bcc ...string)
AddTos struct Add a email list of BCC recipients
func (*Recipients) AddCCs ¶
func (r *Recipients) AddCCs(cc ...string)
AddTos struct Add a email list of CC recipients
func (*Recipients) AddTos ¶
func (r *Recipients) AddTos(to ...string)
AddTos struct Add a email list of common recipients
Click to show internal directories.
Click to hide internal directories.