smtp

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: AGPL-3.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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