email

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MailProviderDev = "dev"
	MailProviderSES = "ses"
)

Variables

This section is empty.

Functions

func StripHTML

func StripHTML(s string) string

StripHTML returns a version of a string with no HTML tags.

Types

type AWSSES

type AWSSES struct{}

func (AWSSES) Send

func (AWSSES) Send(data SendMailData) error

type Dev

type Dev struct{}

func (Dev) Send

func (d Dev) Send(data SendMailData) error

type Mailer added in v1.4.1

type Mailer interface {
	// Send sends the email
	Send(SendMailData) error
}

Mailer is used to have different implementation for sending email

type SendMailData added in v1.4.1

type SendMailData struct {
	From     string `json:"from"`
	FromName string `json:"fromName"`
	To       string `json:"to"`
	ToName   string `json:"toName"`
	Subject  string `json:"subject"`
	HTMLBody string `json:"htmlBody"`
	TextBody string `json:"textBody"`
	ReplyTo  string `json:"replyTo"`

	Body string `json:"body"`
}

SendMailData contains necessary fields to send an email

Jump to

Keyboard shortcuts

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