src

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(_logger *zap.Logger)

Types

type Config

type Config struct {
	SMTPHost     string `mapstructure:"SMTP_HOST"`
	SMTPPort     int    `mapstructure:"SMTP_PORT"`
	SMTPEmail    string `mapstructure:"SMTP_EMAIL"`
	SMTPPassword string `mapstructure:"SMTP_PASSWORD"`
	// contains filtered or unexported fields
}

Config stores SMTP configurations to use for sending emails

type EmailServer

type EmailServer struct {
	UnimplementedEmailServiceServer
	healthpb.UnimplementedHealthServer
}

EmailServer implements EmailServiceServer to be used to create a gRPC server

func (*EmailServer) Check

func (*EmailServer) SendEmail

func (s *EmailServer) SendEmail(ctx context.Context, req *SendEmailRequest) (*ResponseMessage, error)

SendEmail sends an email with given Recipients, Subject, Body, .....

func (*EmailServer) SendEmailWithTemplate

func (s *EmailServer) SendEmailWithTemplate(ctx context.Context, req *SendEmailWithTemplateRequest) (*ResponseMessage, error)

SendEmailWithTemplate sends an email with email template and its parameters. Template should exists beforehand in ./template folder

func (*EmailServer) SendRawEmail

func (s *EmailServer) SendRawEmail(ctx context.Context, req *RawSendEmailRequest) (*ResponseMessage, error)

SendRawEmail sends an email with given Recipients and RFC822 formatted message

Jump to

Keyboard shortcuts

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