mailgun

package module
v0.0.0-...-a6e5920 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: MIT Imports: 10 Imported by: 0

README

go-mailgun

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoggedTransport

func NewLoggedTransport(rt http.RoundTripper, log HTTPLogger) http.RoundTripper

NewLoggedTransport ...

Types

type HTTPLogger

type HTTPLogger interface {
	LogRequest(*http.Request)
	LogResponse(*http.Request, *http.Response, error, time.Duration)
}

HTTPLogger ...

type Mail

type Mail struct {
	Initialized bool

	To, From, Subject, Text string
	// contains filtered or unexported fields
}

Mail this defines the email

func DebugMailClient

func DebugMailClient(domain, api string) Mail

DebugMailClient creates the default email client

func DefaultMailClient

func DefaultMailClient(domain, api string) Mail

DefaultMailClient creates the default email client

func (*Mail) Create

func (mail *Mail) Create(to, from, subject, text string)

Create creates email

func (*Mail) Send

func (mail *Mail) Send() (Response, error)

Send sends the mail

type Response

type Response struct {
	ID      string `json:"id"`
	Message string `json:"message"`
}

Response received response

Jump to

Keyboard shortcuts

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