sendg

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: MIT Imports: 5 Imported by: 0

README

sendg-go

A sendgrid client wrapper with utilities for sending template emails.

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() *Client

type Template

type Template[T any] struct {
	// contains filtered or unexported fields
}

func NewTemplate

func NewTemplate[T any](client *Client, id string, emptyData T) *Template[T]

func (*Template[T]) Mail

func (t *Template[T]) Mail(from string, data T, tos ...string) error

Sends an email via Sendgrid, using the template.

  • tos: mulitple addresses to send the emails to
  • from: the email from which to send the email. This needs to be a verified email within your sendgrid account. More details on authenticating your domain is available at: https://app.sendgrid.com/settings/sender_auth

Jump to

Keyboard shortcuts

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