Documentation ¶
Overview ¶
Package mg holds common code shared between the various mailgun commands.
Index ¶
- Variables
- func Die(err error)
- func FixLocalAddr(a *mail.Address)
- func FixLocalAddrs(list []*mail.Address)
- func Init()
- func Logf(format string, args ...interface{})
- func Mail(msg *Message)
- func MailMIME(from *mail.Address, to []*mail.Address, mime io.Reader)
- func ParseAddress(addr string) (*mail.Address, error)
- type AddrListFlag
- type Message
- type StringListFlag
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IsTTY bool = isTTY() Domain string APIKey string User string = os.Getenv("USER") Verbose bool )
View Source
var ( DebugHTTP bool DisableMail bool )
Functions ¶
func FixLocalAddrs ¶
Types ¶
type AddrListFlag ¶
func (*AddrListFlag) Set ¶
func (x *AddrListFlag) Set(addr string) error
func (*AddrListFlag) String ¶
func (x *AddrListFlag) String() string
type Message ¶
type Message struct { From *mail.Address To []*mail.Address CC []*mail.Address BCC []*mail.Address Subject string Body string `json:"-"` Attachments []string // file names }
A Message is a structured mail message to be sent.
type StringListFlag ¶
type StringListFlag []string
func (*StringListFlag) Set ¶
func (x *StringListFlag) Set(s string) error
func (*StringListFlag) String ¶
func (x *StringListFlag) String() string
Click to show internal directories.
Click to hide internal directories.