sendgrid

package
v0.0.0-...-04b7820 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string) *Client

func (*Client) Send

func (c *Client) Send(person *EmailAddress, from, fromName, subject, content string) error

type Content

type Content struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type Email

type Email struct {
	Personalizations []Personalization `json:"personalizations"`
	From             EmailAddress      `json:"from"`
	Content          []Content         `json:"content"`
}

type EmailAddress

type EmailAddress struct {
	Email string `json:"email"`
	Name  string `json:"name,omitempty"`
}

type Personalization

type Personalization struct {
	To      []EmailAddress `json:"to"`
	Subject string         `json:"subject"`
}

Jump to

Keyboard shortcuts

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