smtp

package
v0.0.0-...-895c7f9 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2017 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host       string
	Port       string
	ServerName string
	Auth       smtp.Auth
	TLSConfig  *tls.Config
}

Config ...

type EmailService

type EmailService struct {
	TemplatesPath    string
	FromDefaultEmail string
	SMTP             *Config
}

EmailService ...

func InitSMTP

func InitSMTP(user, pass, host, port string) *EmailService

InitSMTP configures the email variables

func (*EmailService) Send

func (s *EmailService) Send(e *shopy.Email) error

Send sends the email

func (*EmailService) UseTemplate

func (s *EmailService) UseTemplate(e *shopy.Email, data interface{}, name string) error

UseTemplate adds the template to the email and renders it to the Body field

Jump to

Keyboard shortcuts

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