gleambox

Types

pub type MBox {
  MBox(headers: Dict(String, String), body: String)
  InvalidMBox
}

Constructors

  • MBox(headers: Dict(String, String), body: String)
  • InvalidMBox
pub type Mail {
  Mail(
    from: Result(String, Nil),
    to: Result(String, Nil),
    subject: Result(String, Nil),
    message_id: Result(String, Nil),
    date: Result(Time, Nil),
    body: Result(String, Nil),
    headers: Result(Dict(String, String), Nil),
  )
  InvalidMail
}

Constructors

  • Mail(
      from: Result(String, Nil),
      to: Result(String, Nil),
      subject: Result(String, Nil),
      message_id: Result(String, Nil),
      date: Result(Time, Nil),
      body: Result(String, Nil),
      headers: Result(Dict(String, String), Nil),
    )
  • InvalidMail

Functions

pub fn get_header(mbox: MBox, key: String) -> Result(String, Nil)
pub fn get_headers(
  mbox: MBox,
) -> Result(Dict(String, String), Nil)
pub fn maildir_iterate(
  maildir_path: String,
) -> Iterator(#(String, String))
pub fn maildir_iterator(mbox_path: String) -> Iterator(String)
pub fn main() -> Nil
pub fn parse(mboxcontents: String) -> MBox
Search Document