sparkpost

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Name     string `json:"name,omitempty"`
	Email    string `json:"email"`
	HeaderTo string `json:"header_to,omitempty"`
}

Address is SparkPost' address part.

type Client

type Client struct {
	Key string
}

Client defines Client transactional mail provider.

func (*Client) Send

func (sp *Client) Send(msg *model.Message, async bool) (any, error)

Send sends provided message in async or sync way.

type Content

type Content struct {
	From    Address           `json:"from,omitempty"`
	Headers map[string]string `json:"headers,omitempty"`
	Subject string            `json:"subject,omitempty"`
	Text    string            `json:"text,omitempty"`
	HTML    string            `json:"html,omitempty"`
}

Content defines SparkPost' content.

type Message

type Message struct {
	ReturnPath string      `json:"return_path,omitempty"`
	Recipients []Recipient `json:"recipients,omitempty"`
	Content    Content     `json:"content,omitempt"`
}

Message defines SparkPost' message.

type Recipient

type Recipient struct {
	Address Address `json:"address"`
}

Recipient defines SparkPost' recipient.

Jump to

Keyboard shortcuts

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