class Net::IMAP
def append(mailbox, message, flags = nil, date_time = nil)
TODO: add MULTIAPPEND support
--
assigned UID of the appended message.
This will report the UIDVALIDITY of the destination mailbox and the
response should include an +APPENDUID+ response code with UIDPlusData.
supported and the destination supports persistent UIDs, the server's
If +UIDPLUS+ [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]] is
===== Capabilities
date_time, or message arguments contain errors.
not exist (it is not created automatically), or if the flags,
A Net::IMAP::NoResponseError is raised if the mailbox does
EOF
hello world
To: shugo@ruby-lang.org
From: shugo@ruby-lang.org
Subject: hello
imap.append("inbox", <
For example:
new message; it defaults to the current time.
optional +date_time+ argument specifies the creation time to assign to the
argument is an array of flags initially passed to the new message. The
to append the +message+ to the end of the +mailbox+. The optional +flags+
Sends an {APPEND command [IMAP4rev1 ยง6.3.11]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.11]
def append(mailbox, message, flags = nil, date_time = nil) args = [] if flags args.push(flags) end args.push(date_time) if date_time args.push(Literal.new(message)) send_command("APPEND", mailbox, *args) end