method
body_type_msg
body_type_msg()
private
Hide source
# File lib/net/imap.rb, line 2411 def body_type_msg mtype, msubtype = media_type match(T_SPACE) param, content_id, desc, enc, size = body_fields token = lookahead if token.symbol == T_RPAR # If this is not message/rfc822, we shouldn't apply the RFC822 # spec to it. We should handle anything other than # message/rfc822 using multipart extension data [rfc3501] (i.e. # the data itself won't be returned, we would have to retrieve it # with BODYSTRUCTURE instead of with BODY # Also, sometimes a message/rfc822 is included as a large # attachment instead of having all of the other details # (e.g. attaching a .eml file to an email) if msubtype == "RFC822" return BodyTypeMessage.new(mtype, msubtype, param, content_id, desc, enc, size, nil, nil, nil, nil, nil, nil, nil) else return BodyTypeExtension.new(mtype, msubtype, param, content_id, desc, enc, size) end end match(T_SPACE) env = envelope match(T_SPACE) b = body match(T_SPACE) lines = number md5, disposition, language, extension = body_ext_1part return BodyTypeMessage.new(mtype, msubtype, param, content_id, desc, enc, size, env, b, lines, md5, disposition, language, extension) end