Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MailRequest ¶
type MailRequest struct { Recipient MailRequestEmailAddress `json:"recipient"` Payload map[string]interface{} `json:"payload"` Attachment *MailRequestAttachment `json:"attachment,omitempty"` Body []byte FromName string Subject string ID string }
func (*MailRequest) UnmarshalJSON ¶
func (mr *MailRequest) UnmarshalJSON(jsonBytes []byte) error
type MailRequestAttachment ¶
type MailRequestAttachment struct { Filename string `json:"filename"` DecodedContent []byte `json:"contents"` }
func (*MailRequestAttachment) UnmarshalJSON ¶
func (a *MailRequestAttachment) UnmarshalJSON(jsonBytes []byte) error
type MailRequestEmailAddress ¶
type MailRequestEmailAddress struct { Address string `json:"address"` Name string `json:"name"` ParsedAddress *mail.Address }
func (*MailRequestEmailAddress) UnmarshalJSON ¶
func (a *MailRequestEmailAddress) UnmarshalJSON(jsonBytes []byte) error
type MailerJSONResponse ¶
type MailerServer ¶
type MailerServer struct {
CaCert, ServerCert, ServerKey []byte
SMTPServer, SMTPUser, SMTPPassword, FromDomain string
SMTPPort int
// contains filtered or unexported fields
}
{ "template": "registration", "lang": "en", "recipient": { "address": "email@address.com", "name": "Philip J. Fry" }, "payload": { "user": { "firstname": "Philip J.", "lastname": "Fry", "apikey": "<some valid apikey>" }, "box": { "id": "<some valid senseBox id>", "sensors": [ { "title": "<some title>", "type": "<some type>", "id": "<some valid senseBox sensor id>" }, ... ] } }, "attachment": { "filename": "senseBox.ino", "contents": "<file contents in base64>" } }
MailerServer wraps the https server and the SMTP daemon
func (*MailerServer) Start ¶
func (mailer *MailerServer) Start() error
Click to show internal directories.
Click to hide internal directories.