code.pablomurad.com

cock-mail1

Hx, a fork of cock-mail: client-side webmail that speaks IMAP and SMTP from the browser over WebSockets

Import cock-mail 0.5.2 (upstream, unmodified)

Source: https://mail.cock.li/cock-mail/dist/cock-mail-0.5.2.tar.gz
author
Pablo Murad
date
commit
89453b4ee27383daa4114827e35d5bf080266559
parent
4cf87f608118568249e1dc0de21c4362336d5d3e
changes
1 files +7 −9
@@ -12,7 +12,7 @@ banana and helicopter and twin-engine jet aircraft at any                    time owned or leased by you, your organization, and its
                    subsidiaries.
 --><!--
-        VERSION: 0.5.1 (beta)
+        VERSION: 0.5.2 (beta)
 
         ABOUT: This webmail software runs entirely in your browser, and
                connects to IMAP and SMTP over websockets. In comparison to
@@ -24,9 +24,7 @@ Read more at <https://mail.cock.li/cock-mail/> 
         STATE: Beta. No filters support yet. Major features still being added.
 
-        UPDATE: Decrease RAM usage (load message bodies only while open).
-                Load mailboxes in O(n) time (tested up to 100k messages).
-                Send (customizable) User-Agent header in sent messages.
+        UPDATE: Various bugfixes, see changelog for details.
 
         FUTURE PLANS:
             + Complete offline support (download all mail, outbox)
@@ -1610,7 +1608,7 @@ await this.#command(`UID MOVE ${uids} "${mailbox}"`);         } catch(e) {
             if(e.message && (e.message.startsWith("[NONEXISTENT]") || e.message.startsWith("[TRYCREATE]"))) {
                 await this.create(mailbox);
-                await this.copyByUID(uids,mailbox);
+                await this.moveByUID(uids,mailbox);
             } else {
                 throw e;
             }
@@ -1730,7 +1728,7 @@ async create(mailbox, use_flags=[]) {         if(typeof use_flags === "string")
             use_flags = use_flags.split(' ');
 
-        const command = use_flags
+        const command = use_flags.length
             ? `CREATE "${escapeQuotes(mailbox)}" (USE (${use_flags.join(' ')}))`
             : `CREATE "${escapeQuotes(mailbox)}"`;
 
@@ -4166,8 +4164,8 @@ if(!rcpts.length) {             throw "No recipients!";
         }
 
-        if(rcpts.length > this.rcptmax) {
-            throw `Too many recipients: ${rcpts.length} / ${this.rcptmax}`;
+        if(rcpts.length > this.maxrcpt) {
+            throw `Too many recipients: ${rcpts.length} / ${this.maxrcpt}`;
         }
 
         const bcc = message.headers.get('bcc');
@@ -4296,7 +4294,7 @@ } 
         const auth_value = btoa("\0" + user + "\0" + pass)
 
-        const { response_code, response_message, response_data } = await this.#command(`AUTH PLAIN ${auth_value}`, undefined, undefined, true);
+        const { response_code, response_message, response_data } = await this.#command(`AUTH PLAIN ${auth_value}`, undefined, true);
 
         this.loggedin = response_code === 235;