D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby18
/
share
/
ri
/
1.8
/
system
/
Net
/
IMAP
/
Filename :
fetch-i.yaml
back
Copy
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: "Sends a FETCH command to retrieve data associated with a message in the mailbox. The <tt>set</tt> parameter is a number or an array of numbers or a Range object. The number is a message sequence number. <tt>attr</tt> is a list of attributes to fetch; see the documentation for Net::IMAP::FetchData for a list of valid attributes. The return value is an array of Net::IMAP::FetchData. For example:" - !ruby/struct:SM::Flow::VERB body: " p imap.fetch(6..8, "UID")\n #=> [#<Net::IMAP::FetchData seqno=6, attr={"UID"=>98}>, \\\n #<Net::IMAP::FetchData seqno=7, attr={"UID"=>99}>, \\\n #<Net::IMAP::FetchData seqno=8, attr={"UID"=>100}>]\n p imap.fetch(6, "BODY[HEADER.FIELDS (SUBJECT)]")\n #=> [#<Net::IMAP::FetchData seqno=6, attr={"BODY[HEADER.FIELDS (SUBJECT)]"=>"Subject: test\\r\\n\\r\\n"}>]\n data = imap.uid_fetch(98, ["RFC822.SIZE", "INTERNALDATE"])[0]\n p data.seqno\n #=> 6\n p data.attr["RFC822.SIZE"]\n #=> 611\n p data.attr["INTERNALDATE"]\n #=> "12-Oct-2000 22:40:59 +0900"\n p data.attr["UID"]\n #=> 98\n" full_name: Net::IMAP#fetch is_singleton: false name: fetch params: (set, attr) visibility: public