lib/luggage/message.rb in luggage-1.1.2 vs lib/luggage/message.rb in luggage-1.2.0
- old
+ new
@@ -73,9 +73,16 @@
def save!
mailbox.select!
connection.append(mailbox.name, raw_message, flags.map {|f| f.to_sym.upcase}, date)
end
+ # Uses IMAP's COPY command to copy the message into the named mailbox
+ #
+ def copy_to!(mailbox_name)
+ mailbox.select!
+ connection.uid_copy([uid], Luggage::Mailbox.convert_mailbox_name(mailbox_name))
+ end
+
# Add the 'Deleted' flag to this message on the remote server
#
def delete!
mailbox.select!
connection.uid_store([uid], "+FLAGS", [:Deleted])