The default port for IMAP
connections, port 143
Similar to move()
, but set
contains unique identifiers.
Decode a string from modified UTF-7 format to UTF-8.
UTF-7 is a 7-bit encoding of Unicode [UTF7]. IMAP
uses a slightly modified version of this to encode mailbox names containing non-ASCII characters; see [IMAP] section 5.1.3.
Net::IMAP
does not automatically encode and decode mailbox names to and from UTF-7.
returns the port for POP3
Starts a POP3
session and deletes all messages on the server. If a block is given, each POPMail
object is yielded to it before being deleted.
This method raises a POPAuthenticationError
if authentication fails.
Net::POP3.delete_all('pop.example.com', 110, 'YourAccount', 'YourPassword') do |m| file.write m.pop end
Enable SSL for all new instances. params
is passed to OpenSSL::SSLContext#set_params.
Disable SSL for all new instances.
Enables SSL for this instance. Must be called before the connection is established to have any effect. params[:port]
is port to establish the SSL connection on; Defaults to 995. params
(except :port) is passed to OpenSSL::SSLContext#set_params.
Disable SSL for all new instances.
Deletes all messages on the server.
If called with a block, yields each message in turn before deleting it.
n = 1 pop.delete_all do |m| File.open("inbox/#{n}") do |f| f.write m.pop end n += 1 end
This method raises a POPError
if an error occurs.
The default SMTP
port number, 25.
true if server advertises STARTTLS. You cannot get valid value before opening SMTP
session.
Enables SMTP/TLS (SMTPS: SMTP
over direct TLS connection) for this object. Must be called before the connection is established to have any effect. context
is a OpenSSL::SSL::SSLContext
object.
Disables SMTP/TLS for this object. Must be called before the connection is established to have any effect.
Enables SMTP/TLS (STARTTLS) for this object. context
is a OpenSSL::SSL::SSLContext
object.
Disables SMTP/TLS (STARTTLS) for this object. Must be called before the connection is established to have any effect.
validates typecode v
, returns a true
or false
boolean