package email import ( "git.selly.red/Selly-Modules/natsio" ) // Config ... type Config struct { Nats natsio.Config } type To struct { Name string `json:"name" bson:"name"` Address string `json:"address" bson:"address"` } type From struct { Name string `json:"name" bson:"name"` Address string `json:"address" bson:"address"` } type Recipient struct { To []To `json:"to" bson:"to"` From From `json:"from" bson:"from"` CC []string `json:"cc,omitempty" bson:"CC,omitempty"` BCC []string `json:"bcc,omitempty" bson:"BCC,omitempty"` Subject string `json:"subject,omitempty" bson:"subject,omitempty"` Attachment []Attachment `json:"attachment,omitempty" bson:"attachment,omitempty"` } type Attachment struct { URL string `json:"url"` } type Data struct { Account string `json:"account" bson:"account,omitempty"` Password string `json:"password" bson:"password,omitempty"` } // SendPayload ... type SendPayload struct { Recipient *Recipient `json:"recipient,omitempty" bson:"recipient,omitempty"` Subject string `json:"subject" bson:"subject"` Data *Data `json:"data,omitempty" bson:"data,omitempty"` Key string `json:"key" bson:"key"` TemplateID string `json:"templateId" bson:"templateId"` Content *Content `json:"content,omitempty" bson:"content,omitempty"` } type Content struct { Type string `json:"type" bson:"type"` Value string `json:"value" bson:"value"` } // Response ... type Response struct { RequestID string `json:"requestId"` }