mailer

package module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: MIT Imports: 12 Imported by: 0

README

go-mailer

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMailer added in v0.1.1

func InitMailer()

func SendHtmlTemplateEmail added in v0.1.1

func SendHtmlTemplateEmail(from string, to []string, templateName string, data map[string]interface{})

func TemplateEmailBodyContent added in v0.1.1

func TemplateEmailBodyContent(emailTemplate Template, data map[string]interface{}) (string, error)

func TemplateSubjectContent added in v0.1.1

func TemplateSubjectContent(emailTemplate Template, data map[string]interface{}) (string, error)

Types

type Placeholder added in v0.1.1

type Placeholder struct {
	Key   string `json:"key"`
	Value string `json:"value"`
	Type  string `json:"type"`
}

type SmtpServerConfig added in v0.1.1

type SmtpServerConfig struct {
	SMTP_SERVER_HOST string
	SMTP_SERVER_PORT string
	SMTP_PASS        string
	SMTP_EMAIL_FROM  string
	SMTP_IDENTITY    string
}

type Template added in v0.1.1

type Template struct {
	Name           string        `json:"name"`
	Description    string        `json:"description"`
	Subject        string        `json:"subject"`
	MessageContent string        `json:"message-content"`
	FullContent    string        `json:"full-content"`
	ContentType    string        `json:"content-type"`
	Placeholders   []Placeholder `json:"placeholders"`
}

func GetTemplateByName added in v0.1.1

func GetTemplateByName(templateName string) Template

func GetTemplates added in v0.1.2

func GetTemplates() []Template

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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