email

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key string, fallback string) string

GetEnv gets environment variable matching key string and if it finds none uses fallback string returning either the matching or fallback string

Types

type Config

type Config struct {
	AppURL     string
	SenderName string
	// contains filtered or unexported fields
}

Config contains all the mailserver values

type Email

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

Email contains all the methods to send application emails

func New

func New(AppDomain string, PathPrefix string) *Email

New creates a new instance of Email

func (*Email) Send

func (m *Email) Send(UserName string, UserEmail string, Subject string, Body string) error

Send - utility function to send emails

func (*Email) SendForgotPassword

func (m *Email) SendForgotPassword(UserName string, UserEmail string, ResetID string) error

SendForgotPassword Sends a Forgot Password reset email to user

func (*Email) SendPasswordReset

func (m *Email) SendPasswordReset(UserName string, UserEmail string) error

SendPasswordReset Sends a Reset Password confirmation email to user

func (*Email) SendPasswordUpdate

func (m *Email) SendPasswordUpdate(UserName string, UserEmail string) error

SendPasswordUpdate Sends an Update Password confirmation email to user

func (*Email) SendWelcome

func (m *Email) SendWelcome(UserName string, UserEmail string, VerifyID string) error

SendWelcome sends the welcome email to new registered user

Jump to

Keyboard shortcuts

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