smtp

package
v0.0.0-...-92398f1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCC

func AddCC(msg *gomail.Message, ccs []map[string]string)

func New

Types

type Attachment

type Attachment struct {
	File        string `config:"file"`
	ContentType string `config:"content_type"`
	Inline      bool   `config:"inline"`
	CID         string `config:"cid"`
}

type Config

type Config struct {
	DialTimeoutInSeconds int                    `config:"dial_timeout_in_seconds"`
	MessageField         param.ParaKey          `config:"message_field"`
	VariableStartTag     string                 `config:"variable_start_tag"`
	VariableEndTag       string                 `config:"variable_end_tag"`
	Variables            map[string]interface{} `config:"variables"`

	Servers map[string]*ServerConfig `config:"servers"`

	Templates map[string]*Template `config:"templates"`
}

type SMTPProcessor

type SMTPProcessor struct {
	// contains filtered or unexported fields
}

func (*SMTPProcessor) Name

func (processor *SMTPProcessor) Name() string

func (*SMTPProcessor) Process

func (processor *SMTPProcessor) Process(ctx *pipeline.Context) error

type ServerConfig

type ServerConfig struct {
	Server struct {
		Host string `config:"host"`
		Port int    `config:"port"`
		TLS  bool   `config:"tls"`
	} `config:"server"`

	Auth struct {
		Username string `config:"username"`
		Password string `config:"password"`
	} `config:"auth"`

	SendFrom string `config:"sender"`

	Recipients struct {
		To  []string `config:"to"`
		CC  []string `config:"cc"`
		BCC []string `config:"bcc"`
	} `config:"recipients"`
}

type Template

type Template struct {
	ContentType string       `config:"content_type"` //text or html
	Subject     string       `config:"subject"`
	Body        string       `config:"body"`
	BodyFile    string       `config:"body_file"` //use file to store template
	Attachments []Attachment `config:"attachments"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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