IMAP4rev1 extension SORT command. (typ, [data]) = .sort(sort_criteria, charset, search_criteria, ...)
(self, sort_criteria, charset, *search_criteria)
| 793 | |
| 794 | |
| 795 | def sort(self, sort_criteria, charset, *search_criteria): |
| 796 | """IMAP4rev1 extension SORT command. |
| 797 | |
| 798 | (typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...) |
| 799 | """ |
| 800 | name = 'SORT' |
| 801 | #if not name in self.capabilities: # Let the server decide! |
| 802 | # raise self.error('unimplemented extension command: %s' % name) |
| 803 | if (sort_criteria[0],sort_criteria[-1]) != ('(',')'): |
| 804 | sort_criteria = '(%s)' % sort_criteria |
| 805 | typ, dat = self._simple_command(name, sort_criteria, charset, *search_criteria) |
| 806 | return self._untagged_response(typ, dat, name) |
| 807 | |
| 808 | |
| 809 | def starttls(self, ssl_context=None): |