smtp

package
v0.0.0-...-378a548 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TextHTML  = "text/html"
	TextPlain = "text/plain"
)

Variables

This section is empty.

Functions

func SendWithSSL

func SendWithSSL(smtpAddress string, username, password string, message *Message) error

SendWithoutSSL send mail

func SendWithoutSSL

func SendWithoutSSL(smtpAddress string, username, password string, message *Message) error

SendWithoutSSL send mail

Types

type Contact

type Contact struct {
	Name    string `json:"name"`
	Address string `json:"access"`
}

Contact contact

type File

type File struct {
	Path      string `json:"path"`
	AliasName string `json:"alias-name"`
}

File file

type Message

type Message struct {
	From        Contact   `json:"from"`
	To          []Contact `json:"to"`
	Cc          []Contact `json:"cc"`
	Bcc         []Contact `json:"bcc"`
	Subject     string    `json:"subject"`
	Body        string    `json:"body"`
	ContentType string    `json:"content-type"`
	Attach      []File    `json:"attach"`
}

Message msg

func (*Message) String

func (m *Message) String() string

Jump to

Keyboard shortcuts

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