Documentation ¶
Index ¶
- func Initialize(_logger *zap.Logger)
- type Config
- type EmailServer
- func (s *EmailServer) SendEmail(ctx context.Context, req *SendEmailRequest) (*ResponseMessage, error)
- func (s *EmailServer) SendEmailWithTemplate(ctx context.Context, req *SendEmailWithTemplateRequest) (*ResponseMessage, error)
- func (s *EmailServer) SendRawEmail(ctx context.Context, req *RawSendEmailRequest) (*ResponseMessage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
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
Click to show internal directories.
Click to hide internal directories.