copy

copy(set, mailbox) Instance Public methods Sends a COPY command to copy the specified message(s) to the end of the specified destination mailbox. The set parameter is a number or an array of numbers or a Range object. The number is a message sequence number.

close

close() Instance Public methods Sends a CLOSE command to close the currently selected mailbox. The CLOSE command permanently removes from the mailbox all messages that have the Deleted flag set.

check

check() Instance Public methods Sends a CHECK command to request a checkpoint of the currently selected mailbox. This performs implementation-specific housekeeping, for instance, reconciling the mailbox's in-memory and on-disk state.

capability

capability() Instance Public methods Sends a CAPABILITY command, and returns an array of capabilities that the server supports. Each capability is a string. See [IMAP] for a list of possible capabilities. Note that the Net::IMAP class does not modify its behaviour according to the capabilities of the server; it is up to the user of the class to ensure that a certain capability is supported by a server before using it.

authenticate

authenticate(auth_type, *args) Instance Public methods Sends an AUTHENTICATE command to authenticate the client. The auth_type parameter is a string that represents the authentication mechanism to be used. Currently Net::IMAP supports authentication mechanisms: LOGIN:: login using cleartext user and password. CRAM-MD5:: login with cleartext user and encrypted password (see [RFC-2195] for a full description). This mechanism requires that the server have the us

append

append(mailbox, message, flags = nil, date_time = nil) Instance Public methods Sends a APPEND command to append the message to the end of the mailbox. The optional flags argument is an array of flags to initially passing to the new message. The optional date_time argument specifies the creation time to assign to the new message; it defaults to the current time. For example: imap.append("inbox", <<EOF.gsub(/\n/, "\r\n"), [:Seen], Time.now) Subject: hello From: shugo@ruby-lang

add_response_handler

add_response_handler(handler = Proc.new) Instance Public methods Adds a response handler. For example, to detect when the server sends us a new EXISTS response (which normally indicates new messages being added to the mail box), you could add the following handler after selecting the mailbox. imap.add_response_handler { |resp| if resp.kind_of?(Net::IMAP::UntaggedResponse) and resp.name == "EXISTS" puts "Mailbox now has #{resp.data} messages" end }

new

Net::IMAP.new(host, options = {}) Class Public methods Creates a new Net::IMAP object and connects it to the specified host. options is an option hash, each key of which is a symbol. The available options are: port port number (default value is 143 for imap, or 993 for imaps) ssl if options is true, then an attempt will be made to use SSL (now TLS) to connect to the server. For this to work OpenSSL [OSSL] and the Ruby OpenSSL [RSSL] extensions need to be installed. if option

max_flag_count=

max_flag_count=(count) Class Public methods Sets the max number of flags interned to symbols.

max_flag_count

max_flag_count() Class Public methods Returns the max number of flags interned to symbols.