Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package mail
import "mime/multipart"
// Type for mail
type Type uint8
// Mail types
const (
TypeTextPlain Type = iota
TypeTextHTML
)
// Attach def.
type Attach struct {
Name string
File multipart.File
ShouldUnzip bool
}
// Mail def.
type Mail struct {
ToAddresses []*Address `json:"to_addresses"`
CcAddresses []*Address `json:"cc_addresses"`
BccAddresses []*Address `json:"bcc_addresses"`
Subject string `json:"subject"`
Body string `json:"body"`
Type Type `json:"type"`
}
// Address def.
type Address struct {
Address string `json:"address"`
Name string `json:"name"`
}