mailhtml

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package mailhtml resolves attachment references without changing stored MIME data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeContentID

func NormalizeContentID(value string) string

NormalizeContentID removes MIME's optional outer brackets and whitespace. It deliberately preserves case and URI escapes in the stored identifier.

func RewriteAttachmentReferences

func RewriteAttachmentReferences(input string, attachments []AttachmentReference) string

RewriteAttachmentReferences rewrites only src/href CID attributes. Unknown and ambiguous identifiers remain untouched. Exact matches precede a unique case-insensitive fallback for compatibility with older previews.

Types

type AttachmentReference

type AttachmentReference struct {
	ContentID string
	URL       string
}

AttachmentReference identifies one stored attachment and its rendering URL.

Jump to

Keyboard shortcuts

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