class Athena::MIME::Message

Overview

Provides a low-level API for creating an email.

See Creating Raw Email Message for more information.

Direct Known Subclasses

Defined in:

message.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(headers : AMIME::Header::Collection | Nil = nil, body : AMIME::Part::Abstract | Nil = nil) #

[View source]

Instance Method Detail

def body : AMIME::Part::Abstract | Nil #

Represents the AMIME::Parts that comprise this message.


[View source]
def body=(body : AMIME::Part::Abstract | Nil) #

Represents the AMIME::Parts that comprise this message.


[View source]
def ensure_validity! : Nil #

Asserts that this message is in a valid state to be sent, raising an AMIME::Exception::Logic error if not.


[View source]
def generate_message_id : String #

Returns a string that uniquely represents this message.


[View source]

Represents the AMIME::Headers a part of this message.


[View source]
def headers=(headers : AMIME::Header::Collection) #

Represents the AMIME::Headers a part of this message.


[View source]
def prepared_headers : AMIME::Header::Collection #

Returns a cloned AMIME::Header::Collection consisting of a final representation of the headers associated with this message. I.e. Ensures the message's headers include the required ones.


[View source]