module
Amber::Mailer::MimeBuilder
Overview
Builds RFC 2045-compliant MIME messages from Email structs.
Handles the generation of multipart email messages including:
- Single-part text or HTML messages
- Multipart/alternative messages with both text and HTML
- Multipart/mixed messages with file attachments
- Base64 encoding of binary attachments
- Proper MIME boundary generation using secure random values
This module is used internally by Email#to_mime and should not
typically be called directly.
Defined in:
amber/mailer/mime.crConstant Summary
-
CRLF =
"\r\n"
Class Method Summary
-
.build(email : Email) : String
Builds a complete MIME message string from an Email struct.
-
.generate_boundary : String
Generates a unique MIME boundary string using cryptographically secure random bytes.
Class Method Detail
Builds a complete MIME message string from an Email struct.
The generated message includes all required headers (From, To, Subject, MIME-Version, Date) plus any custom headers, followed by the message body in the appropriate MIME structure.
Generates a unique MIME boundary string using cryptographically secure random bytes.