postmark

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

type Caller struct {
	HTTPClient *http.Client
	Credentials
}

func (*Caller) Send

func (c *Caller) Send(ctx context.Context, msg *Message) error

type Credentials

type Credentials struct {
	ServerAccessToken string
}

type Error

type Error struct {
	CallID            string
	IsNetwork         bool
	StatusCode        int
	ErrorCode         int
	Message           string
	RawResponseBody   []byte
	PrintResponseBody bool
	Cause             error
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Message

type Message struct {
	From          string `json:"From"`
	To            string `json:"To"`
	ReplyTo       string `json:"ReplyTo,omitempty"`
	Cc            string `json:"Cc,omitempty"`
	Bcc           string `json:"Bcc,omitempty"`
	Subject       string `json:"Subject"`
	Tag           string `json:"Tag,omitempty"`
	TextBody      string `json:"TextBody,omitempty"`
	HtmlBody      string `json:"HtmlBody,omitempty"`
	MessageStream string `json:"MessageStream"`
	TemplateId    int64  `json:"TemplateId,omitempty"`
	TemplateModel any    `json:"TemplateModel,omitempty"`
}

Jump to

Keyboard shortcuts

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