Class: Mail::Encodings::EightBit

Inherits:
Binary show all
Defined in:
lib/mail/encodings/8bit.rb

Direct Known Subclasses

SevenBit

Constant Summary collapse

NAME =
'8bit'
PRIORITY =
4

Class Method Summary collapse

Methods inherited from Identity

cost, decode, encode

Methods inherited from TransferEncoding

can_encode?, can_transport?, cost, lowest_cost, negotiate, renegotiate, to_s

Class Method Details

.compatible_input?(str) ⇒ Boolean

Per RFC 2821 4.5.3.1, SMTP lines may not be longer than 1000 octets including the <CRLF>.

Returns:

  • (Boolean)


13
14
15
# File 'lib/mail/encodings/8bit.rb', line 13

def self.compatible_input?(str)
  !str.lines.find { |line| line.bytesize > 998 }
end