sender

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 20 Imported by: 0

README

sender

The sender package handles email composition and delivery over SMTP. It constructs properly formatted multipart MIME messages and sends them through the configured SMTP server.

Architecture

This package is the SMTP client layer for Matcha. It:

  • Builds multipart MIME messages with plain text, HTML, inline images, and file attachments
  • Supports S/MIME detached signing and envelope encryption using PKCS#7
  • Handles SMTP authentication with both PLAIN and LOGIN mechanisms (fallback for servers like Mailo)
  • Supports both implicit TLS (port 465) and STARTTLS (other ports)
  • Generates unique Message-IDs and handles reply threading via In-Reply-To and References headers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendEmail

func SendEmail(account *config.Account, to, cc, bcc []string, subject, plainBody, htmlBody string, images map[string][]byte, attachments map[string][]byte, inReplyTo string, references []string, signSMIME bool, encryptSMIME bool) error

SendEmail constructs a multipart message with plain text, HTML, embedded images, and attachments.

Types

This section is empty.

Jump to

Keyboard shortcuts

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