class Athena::MIME::DraftEmail

Overview

Represent an un-sent AMIME::Email message.

draft_email = AMIME::DraftEmail
  .new
  .to("[email protected]")
  .subject("Important Notification")
  .text("Lorem ipsum...")

# ...

Defined in:

draft_email.cr

Constructors

Instance Method Summary

Instance methods inherited from class Athena::MIME::Email

add_bcc(*addresses : AMIME::Address | String) : self add_bcc, add_cc(*addresses : AMIME::Address | String) : self add_cc, add_from(*addresses : AMIME::Address | String) : self add_from, add_part(part : AMIME::Part::Data) : self add_part, add_reply_to(*addresses : AMIME::Address | String) : self add_reply_to, add_to(*addresses : AMIME::Address | String) : self add_to, attach(body : String | IO, name : String | Nil = nil, content_type : String | Nil = nil) : self attach, attach_from_path(path : String | Path, name : String | Nil = nil, content_type : String | Nil = nil) : self attach_from_path, attachments : Array(AMIME::Part::Data) attachments, bcc : Array(AMIME::Address)
bcc(*addresses : AMIME::Address | String) : self
bcc
, body : AMIME::Part::Abstract body, cc : Array(AMIME::Address)
cc(*addresses : AMIME::Address | String) : self
cc
, date(date : Time) : self
date : Time | Nil
date
, embed(body : String | IO, name : String | Nil = nil, content_type : String | Nil = nil) : self embed, embed_from_path(path : String | Path, name : String | Nil = nil, content_type : String | Nil = nil) : self embed_from_path, ensure_validity! : Nil ensure_validity!, from : Array(AMIME::Address)
from(*addresses : AMIME::Address | String) : self
from
, html(body : String | IO | Nil, charset : String = "UTF-8") : self html, html_body : IO | String | Nil html_body, html_charset : String | Nil html_charset, priority(priority : AMIME::Email::Priority) : self
priority : AMIME::Email::Priority
priority
, reply_to : Array(AMIME::Address)
reply_to(*addresses : AMIME::Address | String) : self
reply_to
, return_path(address : AMIME::Address | String) : self
return_path : AMIME::Address | Nil
return_path
, sender(address : AMIME::Address | String) : self
sender : AMIME::Address | Nil
sender
, subject(subject : String) : self
subject : String | Nil
subject
, text(body : String | IO | Nil, charset : String = "UTF-8") : self text, text_body : IO | String | Nil text_body, text_charset : String | Nil text_charset, to : Array(AMIME::Address)
to(*addresses : AMIME::Address | String) : self
to

Instance methods inherited from class Athena::MIME::Message

body : AMIME::Part::Abstract | Nil body, body=(body : AMIME::Part::Abstract | Nil) body=, ensure_validity! : Nil ensure_validity!, generate_message_id : String generate_message_id, headers : AMIME::Header::Collection headers, headers=(headers : AMIME::Header::Collection) headers=, prepared_headers : AMIME::Header::Collection prepared_headers

Constructor methods inherited from class Athena::MIME::Message

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

Constructor Detail

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

[View source]

Instance Method Detail

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]