B
barjunk
Being new to ruby, I'm having a little trouble getting my mind around
the documentation for net/imap, located here:
http://www.ruby-doc.org/stdlib/libdoc/net/imap/rdoc/index.html
I understand that if I do:
messagestruct = imap.uid_fetch(10,["BODYSTRUCTURE"])[0]
I will get a FetchData object and further processing, like:
message = messagestruct.attr["BODYSTRUCTURE"].parts[0].subtype
would provide me the type of message (Plain, Html, etc) part 0 is.
But I don't get what I'm 'doing'. What words would describe the above
commands?
I know that message will be an array of FetchData objects.
Just looking for some help on how to read the documentation.
The current question I'm trying to answer is:
In order to get the plain text portion of a multipart message, am I
really going to have to call uid_fetch (or fetch), twice? Once to get
the BODYSTRUCTURE, then again to actually get at the text?
Thanks for any direction you may provide.
Mike B.
the documentation for net/imap, located here:
http://www.ruby-doc.org/stdlib/libdoc/net/imap/rdoc/index.html
I understand that if I do:
messagestruct = imap.uid_fetch(10,["BODYSTRUCTURE"])[0]
I will get a FetchData object and further processing, like:
message = messagestruct.attr["BODYSTRUCTURE"].parts[0].subtype
would provide me the type of message (Plain, Html, etc) part 0 is.
But I don't get what I'm 'doing'. What words would describe the above
commands?
I know that message will be an array of FetchData objects.
Just looking for some help on how to read the documentation.
The current question I'm trying to answer is:
In order to get the plain text portion of a multipart message, am I
really going to have to call uid_fetch (or fetch), twice? Once to get
the BODYSTRUCTURE, then again to actually get at the text?
Thanks for any direction you may provide.
Mike B.