module MIME

Overview

MIME Provides raw email parsing capabilities

Defined in:

crystal-mime.cr

Constant Summary

VERSION = "0.1.17"

Class Method Summary

Class Method Detail

def self.is_multipart(content_type : Nil) #

[View source]
def self.is_multipart(content_type : String) #

[View source]
def self.mail_object_from_raw(raw_mime_data) #

[View source]
def self.normalize_crlf(data : String) : String #

Support easy access with String Convert bare LF line endings to CRLF in a single pass. Returns the input unchanged (no copy) when it is already CRLF-only — the common case for mail received over SMTP. Lone CRs pass through untouched, matching the previous gsub(/\r\n/, "\n").gsub(/\n/, "\r\n") behavior without its three full-body copies.


[View source]
def self.parse_raw(mime_str : String) #

[View source]
def self.parse_raw(mime_io : IO, boundary : String | Nil = nil) #

Support efficient access as IO Stream Mail looks like: Content-Type=multipart%2Fmixed%3B+boundary%3D%22------------020601070403020003080006%22&Date=Fri%2...


[View source]