src

package
v0.0.0-...-f0660e3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 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
}

EmailServer implements EmailServiceServer to be used to create a gRPC server

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