smtp

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package smtp delivers a contact message over SMTP. One of the two adapters behind contact.Mailer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

type Sender struct {
	Addr     string // host:port
	Username string
	Password string
	From     string
	To       string
	Timeout  time.Duration
}

Sender sends through a mail server. Returned as a struct: callers hold it through the contact.Mailer interface they declared themselves.

func (Sender) Send

func (s Sender) Send(ctx context.Context, m contact.Message) error

Send delivers one message.

The visitor's address goes in Reply-To, never in From. Sending as them would fail SPF for their domain and get the whole thing filed as spam — the mail is from this service, about them.

Jump to

Keyboard shortcuts

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