removeDeleted() -> expunge()

fork
mscdex 12 years ago
parent 48e37631c7
commit 9333c3a3a0

@ -471,7 +471,7 @@ Connection Instance Methods
}
```
* **removeDeleted**(< _function_ >callback) - _(void)_ - Permanently removes (EXPUNGEs) all messages flagged as Deleted in the currently open mailbox. `callback` has 1 parameter: < _Error_ >err. **Note:** At least on Gmail, performing this operation with any currently open mailbox that is not the Spam or Trash mailbox will merely archive any messages marked as Deleted (by moving them to the 'All Mail' mailbox).
* **expunge**(< _function_ >callback) - _(void)_ - Permanently removes all messages flagged as Deleted in the currently open mailbox. `callback` has 1 parameter: < _Error_ >err. **Note:** At least on Gmail, performing this operation with any currently open mailbox that is not the Spam or Trash mailbox will merely archive any messages marked as Deleted (by moving them to the 'All Mail' mailbox).
* **append**(< _mixed_ >msgData, [< _object_ >options,] < _function_ >callback) - _(void)_ - Appends a message to selected mailbox. `msgData` is a string or Buffer containing an RFC-822 compatible MIME message. Valid `options` properties are:

@ -374,7 +374,7 @@ Connection.prototype.status = function(boxName, cb) {
cb);
};
Connection.prototype.removeDeleted = function(uids, cb) {
Connection.prototype.expunge = function(uids, cb) {
if (typeof uids === 'function') {
cb = uids;
uids = undefined;
@ -551,9 +551,9 @@ Connection.prototype._move = function(which, uids, boxTo, cb) {
self.seq.addFlags(uids, 'Deleted', cbMarkDel);
} else if (task === 3) {
if (which && self.serverSupports('UIDPLUS'))
self.removeDeleted(uids, cb);
self.expunge(uids, cb);
else {
self.removeDeleted(function(e) {
self.expunge(function(e) {
++task;
ccb(e, info);
});

Loading…
Cancel
Save