method

new

ruby latest stable - Class: Mail

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.

new(f)
public

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.