sendgrid

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"`
	SendgridM  *mail.SGMailV3 `json:"id,omitempty"`
}

func NewEmail

func NewEmail() Email

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{})

type Sendgrid

type Sendgrid struct {
	ID        int64  `json:"id,omitempty"`
	Name      string `json:"name,omitempty"`
	APIKey    string `json:"api_key,omitempty"`
	ConunterM int64  `json:"counter_m,omitempty"`
}

func NewProvider

func NewProvider(cfgfile string) *Sendgrid

func (*Sendgrid) GetName

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

func (*Sendgrid) Init

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

func (*Sendgrid) NewEmail

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

func (*Sendgrid) RefactorEmail

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

func (*Sendgrid) SendEmail

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

sendemail function with sendgrid provider

func (*Sendgrid) ToString

func (p *Sendgrid) ToString() string

Jump to

Keyboard shortcuts

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