IMAP4rev1 extension SORT command. (typ, [data]) = .sort(sort_criteria, charset, search_criteria, ...)
(self, sort_criteria, charset, *search_criteria)
| 898 | |
| 899 | |
| 900 | def sort(self, sort_criteria, charset, *search_criteria): |
| 901 | """IMAP4rev1 extension SORT command. |
| 902 | |
| 903 | (typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...) |
| 904 | """ |
| 905 | name = 'SORT' |
| 906 | #if not name in self.capabilities: # Let the server decide! |
| 907 | # raise self.error('unimplemented extension command: %s' % name) |
| 908 | if (sort_criteria[0],sort_criteria[-1]) != ('(',')'): |
| 909 | sort_criteria = '(%s)' % sort_criteria |
| 910 | typ, dat = self._simple_command(name, sort_criteria, charset, *search_criteria) |
| 911 | return self._untagged_response(typ, dat, name) |
| 912 | |
| 913 | |
| 914 | def starttls(self, ssl_context=None): |