email

package
v0.0.0-...-0eec0e3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const OFRIENDS_DATE_FORMATE = "15:04 Jan 02"

Variables

This section is empty.

Functions

This section is empty.

Types

type MailConfig

type MailConfig struct {
	/*
		the service will send email to notify internal communication the visit is coming (day)
		default is 7days = one week before visit come
	*/
	SendingCondition      int    `envconfig:"SENDING_CONDITION" default:"7"`
	TimeZoneLocation      string `envconfig:"TIME_ZONE_LOCATION" default:"Asia/Bangkok"`
	EmailTemplateLocation string `envconfig:"EMAIL_TEMPLATE_LOCATION" default:""`
}

type SendMailService

type SendMailService struct {
	VisitRepo    visit.Repository
	CustomerRepo customer.Repository
	CusAssVis    cusvisitassoc.Repository

	Conf MailConfig
	// contains filtered or unexported fields
}

func NewSendMailService

func NewSendMailService(visitRepo visit.Repository, customerRepo customer.Repository, assoc cusvisitassoc.Repository, l glog.Logger) (*SendMailService, error)

func (*SendMailService) Send

func (m *SendMailService) Send(ctx context.Context, now time.Time) error

func (*SendMailService) SendEmailByVisitID

func (m *SendMailService) SendEmailByVisitID(ctx context.Context, visitID string) error

Jump to

Keyboard shortcuts

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