mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Better error message.
This commit is contained in:
@@ -436,7 +436,6 @@ watch(
|
|||||||
if (!route.query.uid) {
|
if (!route.query.uid) {
|
||||||
const args =
|
const args =
|
||||||
route.query.mailbox === constants.DRAFTS_FOLDER ? [route.query.mailid] : []
|
route.query.mailbox === constants.DRAFTS_FOLDER ? [route.query.mailid] : []
|
||||||
console.log(args)
|
|
||||||
api.createComposeSession(...args).then((resp) => {
|
api.createComposeSession(...args).then((resp) => {
|
||||||
const query = { ...route.query, uid: resp.data.uid }
|
const query = { ...route.query, uid: resp.data.uid }
|
||||||
attachmentCount.value = resp.data.attachments?.length || 0
|
attachmentCount.value = resp.data.attachments?.length || 0
|
||||||
|
|||||||
@@ -783,6 +783,8 @@ class IMAPconnector:
|
|||||||
bcmd = "BODY.PEEK" if readonly else "BODY"
|
bcmd = "BODY.PEEK" if readonly else "BODY"
|
||||||
to_fetch = f"(BODYSTRUCTURE {bcmd}[HEADER.FIELDS ({what})])"
|
to_fetch = f"(BODYSTRUCTURE {bcmd}[HEADER.FIELDS ({what})])"
|
||||||
data = self._cmd("FETCH", mailid, to_fetch)
|
data = self._cmd("FETCH", mailid, to_fetch)
|
||||||
|
if int(mailid) not in data:
|
||||||
|
raise ImapError(f"Message with UID {mailid} not found in {mbox} folder")
|
||||||
return data[int(mailid)]
|
return data[int(mailid)]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user