sendgrid

package
v0.0.0-...-3a65944 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SENDER_AUTH_NAME  = "t1"
	SENDER_AUTH_EMAIL = "lytranvinh.work@gmail.com"
)

Variables

This section is empty.

Functions

func BuildMessageInSendGird

func BuildMessageInSendGird(m Mail) *mail.SGMailV3

Build message in SendGrid

func NewSendToWithSendGrid

func NewSendToWithSendGrid() sendto.ISendTo

implement interface ISendTo to new struct sendToWithSendGrid

Types

type EmailAddress

type EmailAddress struct {
	Address string `json:"address"`
	Name    string `json:"name"`
}

Send a simple text email

type Mail

type Mail struct {
	From             EmailAddress `json:"from"`
	To               string       `json:"to"`
	Subject          string       `json:"subject"`
	Body             string       `json:"body"`
	PlainTextContent string       `json:"plainTextContent"`
	HtmlContent      string       `json:"htmlContent"`
}

Send a simple text email

Jump to

Keyboard shortcuts

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