We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3e7ed21 + 8916a49 commit 3094fccCopy full SHA for 3094fcc
README.md
@@ -50,12 +50,16 @@ end
50
51
```ruby
52
imap.select('Mail/sent-mail')
53
-if not imap.list('Mail/', 'sent-apr03')
+if imap.list('Mail/', 'sent-apr03').empty?
54
imap.create('Mail/sent-apr03')
55
end
56
imap.search(["BEFORE", "30-Apr-2003", "SINCE", "1-Apr-2003"]).each do |message_id|
57
- imap.copy(message_id, "Mail/sent-apr03")
58
- imap.store(message_id, "+FLAGS", [:Deleted])
+ if imap.capable?(:move) || imap.capable?(:IMAP4rev2)
+ imap.move(message_id, "Mail/sent-apr03")
59
+ else
60
+ imap.copy(message_id, "Mail/sent-apr03")
61
+ imap.store(message_id, "+FLAGS", [:Deleted])
62
+ end
63
64
imap.expunge
65
```
0 commit comments