module Amber::Mailer::MimeBuilder

Overview

Builds RFC 2045-compliant MIME messages from Email structs.

Handles the generation of multipart email messages including:

This module is used internally by Email#to_mime and should not typically be called directly.

Defined in:

amber/mailer/mime.cr

Constant Summary

CRLF = "\r\n"

Class Method Summary

Class Method Detail

def self.build(email : Email) : String #

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.


[View source]
def self.generate_boundary : String #

Generates a unique MIME boundary string using cryptographically secure random bytes.


[View source]