Name

Net::POPMail — POP mail class

Synopsis

The Net::POPMail class is used by classes Net::POP3 and Net::APOP to return individual message objects.

Required Library

require ‘net/pop’

Instance Methods

m.all([dest])
m.mail([dest])
m.pop([dest])

Retrieves the contents of mail messages. If dest is specified, each message is appended to it using the << method. If a block is specified, it’s passed the contents of each message as a string and run once for each line in the message.

m.delete

Deletes the message.

m.deleted?

Returns true if the message has been deleted.

m.header([dest])

Returns the message header.

m.size

Returns the message size in bytes.

m.top(lineno[, dest])

Returns the message header and lineno number of lines of the body.

Get Ruby in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.