class Mail::Encodings::EightBit

def self.compatible_input?(str)

Per RFC 2821 4.5.3.1, SMTP lines may not be longer than 1000 octets including the .
def self.compatible_input?(str)
  !str.lines.find { |line| line.bytesize > 998 }
end