sender

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 27 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 SendCalendarReply added in v0.33.0

func SendCalendarReply(account *config.Account, to []string, subject, plainBody string, icsData []byte, inReplyTo string, references []string) ([]byte, error)

SendCalendarReply sends an iMIP (RFC 6047) calendar reply. Google Calendar requires: - multipart/alternative with text/plain + text/calendar; method=REPLY - text/calendar part must NOT be Content-Disposition: attachment

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, signPGP bool, encryptPGP bool) ([]byte, 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