server

package
v0.0.0-...-e16d2a0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(cfg *Config) error

Types

type Config

type Config struct {
	Domain       string `json:"domain"`
	DkimSelector string `json:"dkim_selector"`
	DkimKeyPath  string `json:"dkim_key_path"`
	Address      string `json:"address"`
	TLSCertPath  string `json:"tls_cert_path"`
	TLSKeyPath   string `json:"tls_key_path"`
	Token        string `json:"token"`
}

type SMTPForwardServer

type SMTPForwardServer struct {
	pb2.SMTPForwardServer
	Token  string
	Sender *Sender
}

func NewSMTPForwardServer

func NewSMTPForwardServer(cfg *Config) *SMTPForwardServer

func (*SMTPForwardServer) SendSMTP

func (s *SMTPForwardServer) SendSMTP(ctx context.Context, data *pb2.SMTPData) (*pb2.SMTPResult, error)

type Sender

type Sender struct {
	Domain       string
	DkimSelector string
	DkimKey      *rsa.PrivateKey
}

func NewSender

func NewSender(domain, selector string, keyPath string) *Sender

func (*Sender) SendMail

func (s *Sender) SendMail(message *mail.Message, sender, recipient string) error

Jump to

Keyboard shortcuts

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