Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/alt/ruby27/share/ruby/net
File: pop.rb
# frozen_string_literal: true
[0] Fix | Delete
# = net/pop.rb
[1] Fix | Delete
#
[2] Fix | Delete
# Copyright (c) 1999-2007 Yukihiro Matsumoto.
[3] Fix | Delete
#
[4] Fix | Delete
# Copyright (c) 1999-2007 Minero Aoki.
[5] Fix | Delete
#
[6] Fix | Delete
# Written & maintained by Minero Aoki <aamine@loveruby.net>.
[7] Fix | Delete
#
[8] Fix | Delete
# Documented by William Webber and Minero Aoki.
[9] Fix | Delete
#
[10] Fix | Delete
# This program is free software. You can re-distribute and/or
[11] Fix | Delete
# modify this program under the same terms as Ruby itself,
[12] Fix | Delete
# Ruby Distribute License.
[13] Fix | Delete
#
[14] Fix | Delete
# NOTE: You can find Japanese version of this document at:
[15] Fix | Delete
# http://docs.ruby-lang.org/ja/latest/library/net=2fpop.html
[16] Fix | Delete
#
[17] Fix | Delete
# $Id$
[18] Fix | Delete
#
[19] Fix | Delete
# See Net::POP3 for documentation.
[20] Fix | Delete
#
[21] Fix | Delete
[22] Fix | Delete
require 'net/protocol'
[23] Fix | Delete
require 'digest/md5'
[24] Fix | Delete
require 'timeout'
[25] Fix | Delete
[26] Fix | Delete
begin
[27] Fix | Delete
require "openssl"
[28] Fix | Delete
rescue LoadError
[29] Fix | Delete
end
[30] Fix | Delete
[31] Fix | Delete
module Net
[32] Fix | Delete
[33] Fix | Delete
# Non-authentication POP3 protocol error
[34] Fix | Delete
# (reply code "-ERR", except authentication).
[35] Fix | Delete
class POPError < ProtocolError; end
[36] Fix | Delete
[37] Fix | Delete
# POP3 authentication error.
[38] Fix | Delete
class POPAuthenticationError < ProtoAuthError; end
[39] Fix | Delete
[40] Fix | Delete
# Unexpected response from the server.
[41] Fix | Delete
class POPBadResponse < POPError; end
[42] Fix | Delete
[43] Fix | Delete
#
[44] Fix | Delete
# == What is This Library?
[45] Fix | Delete
#
[46] Fix | Delete
# This library provides functionality for retrieving
[47] Fix | Delete
# email via POP3, the Post Office Protocol version 3. For details
[48] Fix | Delete
# of POP3, see [RFC1939] (http://www.ietf.org/rfc/rfc1939.txt).
[49] Fix | Delete
#
[50] Fix | Delete
# == Examples
[51] Fix | Delete
#
[52] Fix | Delete
# === Retrieving Messages
[53] Fix | Delete
#
[54] Fix | Delete
# This example retrieves messages from the server and deletes them
[55] Fix | Delete
# on the server.
[56] Fix | Delete
#
[57] Fix | Delete
# Messages are written to files named 'inbox/1', 'inbox/2', ....
[58] Fix | Delete
# Replace 'pop.example.com' with your POP3 server address, and
[59] Fix | Delete
# 'YourAccount' and 'YourPassword' with the appropriate account
[60] Fix | Delete
# details.
[61] Fix | Delete
#
[62] Fix | Delete
# require 'net/pop'
[63] Fix | Delete
#
[64] Fix | Delete
# pop = Net::POP3.new('pop.example.com')
[65] Fix | Delete
# pop.start('YourAccount', 'YourPassword') # (1)
[66] Fix | Delete
# if pop.mails.empty?
[67] Fix | Delete
# puts 'No mail.'
[68] Fix | Delete
# else
[69] Fix | Delete
# i = 0
[70] Fix | Delete
# pop.each_mail do |m| # or "pop.mails.each ..." # (2)
[71] Fix | Delete
# File.open("inbox/#{i}", 'w') do |f|
[72] Fix | Delete
# f.write m.pop
[73] Fix | Delete
# end
[74] Fix | Delete
# m.delete
[75] Fix | Delete
# i += 1
[76] Fix | Delete
# end
[77] Fix | Delete
# puts "#{pop.mails.size} mails popped."
[78] Fix | Delete
# end
[79] Fix | Delete
# pop.finish # (3)
[80] Fix | Delete
#
[81] Fix | Delete
# 1. Call Net::POP3#start and start POP session.
[82] Fix | Delete
# 2. Access messages by using POP3#each_mail and/or POP3#mails.
[83] Fix | Delete
# 3. Close POP session by calling POP3#finish or use the block form of #start.
[84] Fix | Delete
#
[85] Fix | Delete
# === Shortened Code
[86] Fix | Delete
#
[87] Fix | Delete
# The example above is very verbose. You can shorten the code by using
[88] Fix | Delete
# some utility methods. First, the block form of Net::POP3.start can
[89] Fix | Delete
# be used instead of POP3.new, POP3#start and POP3#finish.
[90] Fix | Delete
#
[91] Fix | Delete
# require 'net/pop'
[92] Fix | Delete
#
[93] Fix | Delete
# Net::POP3.start('pop.example.com', 110,
[94] Fix | Delete
# 'YourAccount', 'YourPassword') do |pop|
[95] Fix | Delete
# if pop.mails.empty?
[96] Fix | Delete
# puts 'No mail.'
[97] Fix | Delete
# else
[98] Fix | Delete
# i = 0
[99] Fix | Delete
# pop.each_mail do |m| # or "pop.mails.each ..."
[100] Fix | Delete
# File.open("inbox/#{i}", 'w') do |f|
[101] Fix | Delete
# f.write m.pop
[102] Fix | Delete
# end
[103] Fix | Delete
# m.delete
[104] Fix | Delete
# i += 1
[105] Fix | Delete
# end
[106] Fix | Delete
# puts "#{pop.mails.size} mails popped."
[107] Fix | Delete
# end
[108] Fix | Delete
# end
[109] Fix | Delete
#
[110] Fix | Delete
# POP3#delete_all is an alternative for #each_mail and #delete.
[111] Fix | Delete
#
[112] Fix | Delete
# require 'net/pop'
[113] Fix | Delete
#
[114] Fix | Delete
# Net::POP3.start('pop.example.com', 110,
[115] Fix | Delete
# 'YourAccount', 'YourPassword') do |pop|
[116] Fix | Delete
# if pop.mails.empty?
[117] Fix | Delete
# puts 'No mail.'
[118] Fix | Delete
# else
[119] Fix | Delete
# i = 1
[120] Fix | Delete
# pop.delete_all do |m|
[121] Fix | Delete
# File.open("inbox/#{i}", 'w') do |f|
[122] Fix | Delete
# f.write m.pop
[123] Fix | Delete
# end
[124] Fix | Delete
# i += 1
[125] Fix | Delete
# end
[126] Fix | Delete
# end
[127] Fix | Delete
# end
[128] Fix | Delete
#
[129] Fix | Delete
# And here is an even shorter example.
[130] Fix | Delete
#
[131] Fix | Delete
# require 'net/pop'
[132] Fix | Delete
#
[133] Fix | Delete
# i = 0
[134] Fix | Delete
# Net::POP3.delete_all('pop.example.com', 110,
[135] Fix | Delete
# 'YourAccount', 'YourPassword') do |m|
[136] Fix | Delete
# File.open("inbox/#{i}", 'w') do |f|
[137] Fix | Delete
# f.write m.pop
[138] Fix | Delete
# end
[139] Fix | Delete
# i += 1
[140] Fix | Delete
# end
[141] Fix | Delete
#
[142] Fix | Delete
# === Memory Space Issues
[143] Fix | Delete
#
[144] Fix | Delete
# All the examples above get each message as one big string.
[145] Fix | Delete
# This example avoids this.
[146] Fix | Delete
#
[147] Fix | Delete
# require 'net/pop'
[148] Fix | Delete
#
[149] Fix | Delete
# i = 1
[150] Fix | Delete
# Net::POP3.delete_all('pop.example.com', 110,
[151] Fix | Delete
# 'YourAccount', 'YourPassword') do |m|
[152] Fix | Delete
# File.open("inbox/#{i}", 'w') do |f|
[153] Fix | Delete
# m.pop do |chunk| # get a message little by little.
[154] Fix | Delete
# f.write chunk
[155] Fix | Delete
# end
[156] Fix | Delete
# i += 1
[157] Fix | Delete
# end
[158] Fix | Delete
# end
[159] Fix | Delete
#
[160] Fix | Delete
# === Using APOP
[161] Fix | Delete
#
[162] Fix | Delete
# The net/pop library supports APOP authentication.
[163] Fix | Delete
# To use APOP, use the Net::APOP class instead of the Net::POP3 class.
[164] Fix | Delete
# You can use the utility method, Net::POP3.APOP(). For example:
[165] Fix | Delete
#
[166] Fix | Delete
# require 'net/pop'
[167] Fix | Delete
#
[168] Fix | Delete
# # Use APOP authentication if $isapop == true
[169] Fix | Delete
# pop = Net::POP3.APOP($isapop).new('apop.example.com', 110)
[170] Fix | Delete
# pop.start('YourAccount', 'YourPassword') do |pop|
[171] Fix | Delete
# # Rest of the code is the same.
[172] Fix | Delete
# end
[173] Fix | Delete
#
[174] Fix | Delete
# === Fetch Only Selected Mail Using 'UIDL' POP Command
[175] Fix | Delete
#
[176] Fix | Delete
# If your POP server provides UIDL functionality,
[177] Fix | Delete
# you can grab only selected mails from the POP server.
[178] Fix | Delete
# e.g.
[179] Fix | Delete
#
[180] Fix | Delete
# def need_pop?( id )
[181] Fix | Delete
# # determine if we need pop this mail...
[182] Fix | Delete
# end
[183] Fix | Delete
#
[184] Fix | Delete
# Net::POP3.start('pop.example.com', 110,
[185] Fix | Delete
# 'Your account', 'Your password') do |pop|
[186] Fix | Delete
# pop.mails.select { |m| need_pop?(m.unique_id) }.each do |m|
[187] Fix | Delete
# do_something(m.pop)
[188] Fix | Delete
# end
[189] Fix | Delete
# end
[190] Fix | Delete
#
[191] Fix | Delete
# The POPMail#unique_id() method returns the unique-id of the message as a
[192] Fix | Delete
# String. Normally the unique-id is a hash of the message.
[193] Fix | Delete
#
[194] Fix | Delete
class POP3 < Protocol
[195] Fix | Delete
[196] Fix | Delete
# svn revision of this library
[197] Fix | Delete
Revision = %q$Revision$.split[1]
[198] Fix | Delete
[199] Fix | Delete
#
[200] Fix | Delete
# Class Parameters
[201] Fix | Delete
#
[202] Fix | Delete
[203] Fix | Delete
# returns the port for POP3
[204] Fix | Delete
def POP3.default_port
[205] Fix | Delete
default_pop3_port()
[206] Fix | Delete
end
[207] Fix | Delete
[208] Fix | Delete
# The default port for POP3 connections, port 110
[209] Fix | Delete
def POP3.default_pop3_port
[210] Fix | Delete
110
[211] Fix | Delete
end
[212] Fix | Delete
[213] Fix | Delete
# The default port for POP3S connections, port 995
[214] Fix | Delete
def POP3.default_pop3s_port
[215] Fix | Delete
995
[216] Fix | Delete
end
[217] Fix | Delete
[218] Fix | Delete
def POP3.socket_type #:nodoc: obsolete
[219] Fix | Delete
Net::InternetMessageIO
[220] Fix | Delete
end
[221] Fix | Delete
[222] Fix | Delete
#
[223] Fix | Delete
# Utilities
[224] Fix | Delete
#
[225] Fix | Delete
[226] Fix | Delete
# Returns the APOP class if +isapop+ is true; otherwise, returns
[227] Fix | Delete
# the POP class. For example:
[228] Fix | Delete
#
[229] Fix | Delete
# # Example 1
[230] Fix | Delete
# pop = Net::POP3::APOP($is_apop).new(addr, port)
[231] Fix | Delete
#
[232] Fix | Delete
# # Example 2
[233] Fix | Delete
# Net::POP3::APOP($is_apop).start(addr, port) do |pop|
[234] Fix | Delete
# ....
[235] Fix | Delete
# end
[236] Fix | Delete
#
[237] Fix | Delete
def POP3.APOP(isapop)
[238] Fix | Delete
isapop ? APOP : POP3
[239] Fix | Delete
end
[240] Fix | Delete
[241] Fix | Delete
# Starts a POP3 session and iterates over each POPMail object,
[242] Fix | Delete
# yielding it to the +block+.
[243] Fix | Delete
# This method is equivalent to:
[244] Fix | Delete
#
[245] Fix | Delete
# Net::POP3.start(address, port, account, password) do |pop|
[246] Fix | Delete
# pop.each_mail do |m|
[247] Fix | Delete
# yield m
[248] Fix | Delete
# end
[249] Fix | Delete
# end
[250] Fix | Delete
#
[251] Fix | Delete
# This method raises a POPAuthenticationError if authentication fails.
[252] Fix | Delete
#
[253] Fix | Delete
# === Example
[254] Fix | Delete
#
[255] Fix | Delete
# Net::POP3.foreach('pop.example.com', 110,
[256] Fix | Delete
# 'YourAccount', 'YourPassword') do |m|
[257] Fix | Delete
# file.write m.pop
[258] Fix | Delete
# m.delete if $DELETE
[259] Fix | Delete
# end
[260] Fix | Delete
#
[261] Fix | Delete
def POP3.foreach(address, port = nil,
[262] Fix | Delete
account = nil, password = nil,
[263] Fix | Delete
isapop = false, &block) # :yields: message
[264] Fix | Delete
start(address, port, account, password, isapop) {|pop|
[265] Fix | Delete
pop.each_mail(&block)
[266] Fix | Delete
}
[267] Fix | Delete
end
[268] Fix | Delete
[269] Fix | Delete
# Starts a POP3 session and deletes all messages on the server.
[270] Fix | Delete
# If a block is given, each POPMail object is yielded to it before
[271] Fix | Delete
# being deleted.
[272] Fix | Delete
#
[273] Fix | Delete
# This method raises a POPAuthenticationError if authentication fails.
[274] Fix | Delete
#
[275] Fix | Delete
# === Example
[276] Fix | Delete
#
[277] Fix | Delete
# Net::POP3.delete_all('pop.example.com', 110,
[278] Fix | Delete
# 'YourAccount', 'YourPassword') do |m|
[279] Fix | Delete
# file.write m.pop
[280] Fix | Delete
# end
[281] Fix | Delete
#
[282] Fix | Delete
def POP3.delete_all(address, port = nil,
[283] Fix | Delete
account = nil, password = nil,
[284] Fix | Delete
isapop = false, &block)
[285] Fix | Delete
start(address, port, account, password, isapop) {|pop|
[286] Fix | Delete
pop.delete_all(&block)
[287] Fix | Delete
}
[288] Fix | Delete
end
[289] Fix | Delete
[290] Fix | Delete
# Opens a POP3 session, attempts authentication, and quits.
[291] Fix | Delete
#
[292] Fix | Delete
# This method raises POPAuthenticationError if authentication fails.
[293] Fix | Delete
#
[294] Fix | Delete
# === Example: normal POP3
[295] Fix | Delete
#
[296] Fix | Delete
# Net::POP3.auth_only('pop.example.com', 110,
[297] Fix | Delete
# 'YourAccount', 'YourPassword')
[298] Fix | Delete
#
[299] Fix | Delete
# === Example: APOP
[300] Fix | Delete
#
[301] Fix | Delete
# Net::POP3.auth_only('pop.example.com', 110,
[302] Fix | Delete
# 'YourAccount', 'YourPassword', true)
[303] Fix | Delete
#
[304] Fix | Delete
def POP3.auth_only(address, port = nil,
[305] Fix | Delete
account = nil, password = nil,
[306] Fix | Delete
isapop = false)
[307] Fix | Delete
new(address, port, isapop).auth_only account, password
[308] Fix | Delete
end
[309] Fix | Delete
[310] Fix | Delete
# Starts a pop3 session, attempts authentication, and quits.
[311] Fix | Delete
# This method must not be called while POP3 session is opened.
[312] Fix | Delete
# This method raises POPAuthenticationError if authentication fails.
[313] Fix | Delete
def auth_only(account, password)
[314] Fix | Delete
raise IOError, 'opening previously opened POP session' if started?
[315] Fix | Delete
start(account, password) {
[316] Fix | Delete
;
[317] Fix | Delete
}
[318] Fix | Delete
end
[319] Fix | Delete
[320] Fix | Delete
#
[321] Fix | Delete
# SSL
[322] Fix | Delete
#
[323] Fix | Delete
[324] Fix | Delete
@ssl_params = nil
[325] Fix | Delete
[326] Fix | Delete
# :call-seq:
[327] Fix | Delete
# Net::POP.enable_ssl(params = {})
[328] Fix | Delete
#
[329] Fix | Delete
# Enable SSL for all new instances.
[330] Fix | Delete
# +params+ is passed to OpenSSL::SSLContext#set_params.
[331] Fix | Delete
def POP3.enable_ssl(*args)
[332] Fix | Delete
@ssl_params = create_ssl_params(*args)
[333] Fix | Delete
end
[334] Fix | Delete
[335] Fix | Delete
# Constructs proper parameters from arguments
[336] Fix | Delete
def POP3.create_ssl_params(verify_or_params = {}, certs = nil)
[337] Fix | Delete
begin
[338] Fix | Delete
params = verify_or_params.to_hash
[339] Fix | Delete
rescue NoMethodError
[340] Fix | Delete
params = {}
[341] Fix | Delete
params[:verify_mode] = verify_or_params
[342] Fix | Delete
if certs
[343] Fix | Delete
if File.file?(certs)
[344] Fix | Delete
params[:ca_file] = certs
[345] Fix | Delete
elsif File.directory?(certs)
[346] Fix | Delete
params[:ca_path] = certs
[347] Fix | Delete
end
[348] Fix | Delete
end
[349] Fix | Delete
end
[350] Fix | Delete
return params
[351] Fix | Delete
end
[352] Fix | Delete
[353] Fix | Delete
# Disable SSL for all new instances.
[354] Fix | Delete
def POP3.disable_ssl
[355] Fix | Delete
@ssl_params = nil
[356] Fix | Delete
end
[357] Fix | Delete
[358] Fix | Delete
# returns the SSL Parameters
[359] Fix | Delete
#
[360] Fix | Delete
# see also POP3.enable_ssl
[361] Fix | Delete
def POP3.ssl_params
[362] Fix | Delete
return @ssl_params
[363] Fix | Delete
end
[364] Fix | Delete
[365] Fix | Delete
# returns +true+ if POP3.ssl_params is set
[366] Fix | Delete
def POP3.use_ssl?
[367] Fix | Delete
return !@ssl_params.nil?
[368] Fix | Delete
end
[369] Fix | Delete
[370] Fix | Delete
# returns whether verify_mode is enable from POP3.ssl_params
[371] Fix | Delete
def POP3.verify
[372] Fix | Delete
return @ssl_params[:verify_mode]
[373] Fix | Delete
end
[374] Fix | Delete
[375] Fix | Delete
# returns the :ca_file or :ca_path from POP3.ssl_params
[376] Fix | Delete
def POP3.certs
[377] Fix | Delete
return @ssl_params[:ca_file] || @ssl_params[:ca_path]
[378] Fix | Delete
end
[379] Fix | Delete
[380] Fix | Delete
#
[381] Fix | Delete
# Session management
[382] Fix | Delete
#
[383] Fix | Delete
[384] Fix | Delete
# Creates a new POP3 object and open the connection. Equivalent to
[385] Fix | Delete
#
[386] Fix | Delete
# Net::POP3.new(address, port, isapop).start(account, password)
[387] Fix | Delete
#
[388] Fix | Delete
# If +block+ is provided, yields the newly-opened POP3 object to it,
[389] Fix | Delete
# and automatically closes it at the end of the session.
[390] Fix | Delete
#
[391] Fix | Delete
# === Example
[392] Fix | Delete
#
[393] Fix | Delete
# Net::POP3.start(addr, port, account, password) do |pop|
[394] Fix | Delete
# pop.each_mail do |m|
[395] Fix | Delete
# file.write m.pop
[396] Fix | Delete
# m.delete
[397] Fix | Delete
# end
[398] Fix | Delete
# end
[399] Fix | Delete
#
[400] Fix | Delete
def POP3.start(address, port = nil,
[401] Fix | Delete
account = nil, password = nil,
[402] Fix | Delete
isapop = false, &block) # :yield: pop
[403] Fix | Delete
new(address, port, isapop).start(account, password, &block)
[404] Fix | Delete
end
[405] Fix | Delete
[406] Fix | Delete
# Creates a new POP3 object.
[407] Fix | Delete
#
[408] Fix | Delete
# +address+ is the hostname or ip address of your POP3 server.
[409] Fix | Delete
#
[410] Fix | Delete
# The optional +port+ is the port to connect to.
[411] Fix | Delete
#
[412] Fix | Delete
# The optional +isapop+ specifies whether this connection is going
[413] Fix | Delete
# to use APOP authentication; it defaults to +false+.
[414] Fix | Delete
#
[415] Fix | Delete
# This method does *not* open the TCP connection.
[416] Fix | Delete
def initialize(addr, port = nil, isapop = false)
[417] Fix | Delete
@address = addr
[418] Fix | Delete
@ssl_params = POP3.ssl_params
[419] Fix | Delete
@port = port
[420] Fix | Delete
@apop = isapop
[421] Fix | Delete
[422] Fix | Delete
@command = nil
[423] Fix | Delete
@socket = nil
[424] Fix | Delete
@started = false
[425] Fix | Delete
@open_timeout = 30
[426] Fix | Delete
@read_timeout = 60
[427] Fix | Delete
@debug_output = nil
[428] Fix | Delete
[429] Fix | Delete
@mails = nil
[430] Fix | Delete
@n_mails = nil
[431] Fix | Delete
@n_bytes = nil
[432] Fix | Delete
end
[433] Fix | Delete
[434] Fix | Delete
# Does this instance use APOP authentication?
[435] Fix | Delete
def apop?
[436] Fix | Delete
@apop
[437] Fix | Delete
end
[438] Fix | Delete
[439] Fix | Delete
# does this instance use SSL?
[440] Fix | Delete
def use_ssl?
[441] Fix | Delete
return !@ssl_params.nil?
[442] Fix | Delete
end
[443] Fix | Delete
[444] Fix | Delete
# :call-seq:
[445] Fix | Delete
# Net::POP#enable_ssl(params = {})
[446] Fix | Delete
#
[447] Fix | Delete
# Enables SSL for this instance. Must be called before the connection is
[448] Fix | Delete
# established to have any effect.
[449] Fix | Delete
# +params[:port]+ is port to establish the SSL connection on; Defaults to 995.
[450] Fix | Delete
# +params+ (except :port) is passed to OpenSSL::SSLContext#set_params.
[451] Fix | Delete
def enable_ssl(verify_or_params = {}, certs = nil, port = nil)
[452] Fix | Delete
begin
[453] Fix | Delete
@ssl_params = verify_or_params.to_hash.dup
[454] Fix | Delete
@port = @ssl_params.delete(:port) || @port
[455] Fix | Delete
rescue NoMethodError
[456] Fix | Delete
@ssl_params = POP3.create_ssl_params(verify_or_params, certs)
[457] Fix | Delete
@port = port || @port
[458] Fix | Delete
end
[459] Fix | Delete
end
[460] Fix | Delete
[461] Fix | Delete
# Disable SSL for all new instances.
[462] Fix | Delete
def disable_ssl
[463] Fix | Delete
@ssl_params = nil
[464] Fix | Delete
end
[465] Fix | Delete
[466] Fix | Delete
# Provide human-readable stringification of class state.
[467] Fix | Delete
def inspect
[468] Fix | Delete
+"#<#{self.class} #{@address}:#{@port} open=#{@started}>"
[469] Fix | Delete
end
[470] Fix | Delete
[471] Fix | Delete
# *WARNING*: This method causes a serious security hole.
[472] Fix | Delete
# Use this method only for debugging.
[473] Fix | Delete
#
[474] Fix | Delete
# Set an output stream for debugging.
[475] Fix | Delete
#
[476] Fix | Delete
# === Example
[477] Fix | Delete
#
[478] Fix | Delete
# pop = Net::POP.new(addr, port)
[479] Fix | Delete
# pop.set_debug_output $stderr
[480] Fix | Delete
# pop.start(account, passwd) do |pop|
[481] Fix | Delete
# ....
[482] Fix | Delete
# end
[483] Fix | Delete
#
[484] Fix | Delete
def set_debug_output(arg)
[485] Fix | Delete
@debug_output = arg
[486] Fix | Delete
end
[487] Fix | Delete
[488] Fix | Delete
# The address to connect to.
[489] Fix | Delete
attr_reader :address
[490] Fix | Delete
[491] Fix | Delete
# The port number to connect to.
[492] Fix | Delete
def port
[493] Fix | Delete
return @port || (use_ssl? ? POP3.default_pop3s_port : POP3.default_pop3_port)
[494] Fix | Delete
end
[495] Fix | Delete
[496] Fix | Delete
# Seconds to wait until a connection is opened.
[497] Fix | Delete
# If the POP3 object cannot open a connection within this time,
[498] Fix | Delete
# it raises a Net::OpenTimeout exception. The default value is 30 seconds.
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function