Method: Mail::Message#encoded

Defined in:
lib/mail/message.rb

#encodedObject

Outputs an encoded string representation of the mail message including all headers, attachments, etc. This is an encoded email in US-ASCII, so it is able to be directly sent to an email server.



1810
1811
1812
1813
1814
1815
1816
# File 'lib/mail/message.rb', line 1810

def encoded
  ready_to_send!
  buffer = header.encoded
  buffer << "\r\n"
  buffer << body.encoded(content_transfer_encoding)
  buffer
end