mail

package
v0.2.29 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package mail provides simple email composition and sending via SMTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(addr string, auth smtp.Auth, msg *Message) error

Send sends the message via the given SMTP server address (host:port). Auth may be nil for unauthenticated relays.

Types

type Message

type Message struct {
	From       string
	To         []string
	Subject    string
	Body       string
	Precedence string // e.g. "bulk"; left empty if not needed
}

Message represents an email message.

func (*Message) Bytes

func (m *Message) Bytes() []byte

Bytes composes the raw RFC 2822 message.

Jump to

Keyboard shortcuts

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