mailgun

package
v0.0.0-...-56a2adc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Cfgfile = `provider.conf`
)

Functions

This section is empty.

Types

type Email

type Email struct {
	PlainEmail models.Email     `json:"plain_email,omitempty"`
	MailgunM   *mailgun.Message `json:"mailgun_m,omitempty"`
}

func (*Email) AddAttachment

func (m *Email) AddAttachment(a interface{}) (err error)

func (*Email) AddContent

func (m *Email) AddContent(c interface{}) (err error)

func (*Email) AddRecipients

func (m *Email) AddRecipients(r interface{}) (err error)

func (*Email) AddSender

func (m *Email) AddSender(s interface{}) (err error)

func (*Email) AddSubject

func (m *Email) AddSubject(s string) (err error)

func (*Email) AddTemplate

func (m *Email) AddTemplate(t interface{}) (err error)

func (*Email) GetInfo

func (e *Email) GetInfo() map[string]interface{}

func (*Email) GetPlainEmail

func (m *Email) GetPlainEmail() (email interface{})

func (*Email) SetValues

func (m *Email) SetValues() (err error)

type Mailgun

type Mailgun struct {
	ID           int64  `json:"id,omitempty"`
	Name         string `json:"name,omitempty"`
	Domain       string `json:"domain,omitempty"`
	APIKey       string `json:"api_key,omitempty"`
	PublicAPIKey string `json:"public_api_key,omitempty"`
	CounterM     int64  `json:"counter_m,omitempty"`
}

func NewProvider

func NewProvider(cfgfile string) *Mailgun

func (*Mailgun) GetName

func (p *Mailgun) GetName() (name string)

func (*Mailgun) Init

func (p *Mailgun) Init() (err error)

func (*Mailgun) NewEmail

func (p *Mailgun) NewEmail(se interface{}, s string, c interface{}) (ms interface{}, err error)

func (*Mailgun) RefactorEmail

func (p *Mailgun) RefactorEmail(mail map[string]interface{}) (ms interface{}, err error)

func (*Mailgun) SendEmail

func (p *Mailgun) SendEmail(emailI interface{}) (err error)

SendEmail send a mailgun email

func (*Mailgun) ToString

func (p *Mailgun) ToString() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL