Changeset 56c17300


Ignore:
Timestamp:
Feb 21, 2018 3:05:15 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
4b1a357
Parents:
61ae0a5
Message:

SusiMail?: Add Date header to sent messages, as required
Make Loader static

Location:
apps/susimail/src/src/i2p/susi/webmail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/susimail/src/src/i2p/susi/webmail/PersistentMailCache.java

    r61ae0a5 r56c17300  
    163163         * @since 0.9.34
    164164         */
    165         private class Loader implements Runnable {
     165        private static class Loader implements Runnable {
    166166                private final Queue<File> _in;
    167167                private final Queue<Mail> _out;
     
    346346
    347347        /**
     348         *  This is for the initial load only.
     349         *  Others will use getMail().
     350         *
    348351         *  @return null on failure
    349352         */
  • apps/susimail/src/src/i2p/susi/webmail/WebMail.java

    r61ae0a5 r56c17300  
    8585import net.i2p.servlet.util.WriterOutputStream;
    8686import net.i2p.util.I2PAppThread;
     87import net.i2p.util.RFC822Date;
    8788import net.i2p.util.SecureFileOutputStream;
    8889import net.i2p.util.Translate;
     
    24932494                if( ok ) {
    24942495                        StringBuilder body = new StringBuilder(1024);
     2496                        I2PAppContext ctx = I2PAppContext.getGlobalContext();
     2497                        body.append("Date: " + RFC822Date.to822Date(ctx.clock().now()) + "\r\n");
    24952498                        // todo include real names, and headerline encode them
    24962499                        body.append( "From: " + from + "\r\n" );
     
    25032506                                sessionObject.error += e.getMessage();
    25042507                        }
    2505                         String boundary = "_=" + I2PAppContext.getGlobalContext().random().nextLong();
     2508                        String boundary = "_=" + ctx.random().nextLong();
    25062509                        if (multipart) {
    25072510                                body.append( "MIME-Version: 1.0\r\nContent-type: multipart/mixed; boundary=\"" + boundary + "\"\r\n\r\n" );
Note: See TracChangeset for help on using the changeset viewer.