Project

mailread

0.01
No commit activity in last 3 years
No release in over 3 years
The Mail class represents an internet mail message (as per RFC822, RFC2822) with headers and a body
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

Mail

The Mail class represents an internet mail message (as per RFC822, RFC2822) with headers and a body.

This lib was removed from the 1.9.x Stdlib. It as present until 1.8.7.

http://ruby-doc.org/stdlib-1.8.7/libdoc/mailread/rdoc/Mail.html

Public Class Methods

new(f)
Create a new Mail where f is either a stream which responds to gets(), or a 
path to a file. If f is a path it will be opened.

The whole message is read so it can be made available through the header, 
#[] and body methods.

The “From ” line is ignored if the mail is in mbox format.

Public Instance Methods

[](field)
Return the header corresponding to field.

Matching is case-insensitive.

body()
Return the message body as an Array of lines

header()
Return the headers as a Hash.

Travis CI

Added support.