email

package
v1.2.17 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(tomlFilepath string) error

Init - initializes toml file configurations

func InitUsingJSON

func InitUsingJSON(configs []EmailConfig)

InitUsingJSON initializes Email Connections for give JSON data

Types

type Email

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

func NewEmail

func NewEmail(to, cc, bcc, attachments []string, from, replyTo, subject, body string) *Email

func (*Email) ParsePlainText

func (email *Email) ParsePlainText(templateFileText string, templateData interface{}) error

ParsePlainText - ParsePlainText

func (*Email) ParseTemplateFile added in v1.2.12

func (email *Email) ParseTemplateFile(templateFilePath string, templateData interface{}) error

func (*Email) ParseTemplateText

func (email *Email) ParseTemplateText(templateFileText string, templateData interface{}) error

ParseTemplateText - ParseTemplateText

func (*Email) Send

func (email *Email) Send() error

Send -send email

func (*Email) SendMail

func (email *Email) SendMail(templateFilePath string, templateData interface{}) error

SendMail - send email service sends email as per the given html template and data templateData can contain any type of values, including array, slice, map, struct and func

func (*Email) SendMailFromSLS

func (email *Email) SendMailFromSLS(hostName string) error

SendMailFromSLS -send email

func (*Email) SendMailWithHandlebar

func (email *Email) SendMailWithHandlebar(templateText string, templateData interface{}) error

SendMailWithHandlebar - send email service sends email as per the given html text and data templateData can contain any type of values, including array, slice, map, struct and func

func (*Email) SetAlternateText

func (email *Email) SetAlternateText(plainBody string)

SetAlternateText - set alternate text for email

type EmailConfig

type EmailConfig struct {
	HostName  string `json:"hostName"`
	Server    string `json:"server"`
	Port      int    `json:"port"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	SSL       bool   `json:"SSL"`
	IsDefault bool   `json:"isDefault"`
}

EmailConfig - EmailConfig

Jump to

Keyboard shortcuts

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