OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 144 | Rev 182 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 144 Rev 149
Line 37... Line 37...
37
        props.setProperty("mail." + protocol + ".timeout", "180000");
37
        props.setProperty("mail." + protocol + ".timeout", "180000");
38
        props.setProperty("mail." + protocol + ".writetimeout", "180000");
38
        props.setProperty("mail." + protocol + ".writetimeout", "180000");
39
    }
39
    }
40
 
40
 
41
    /**
41
    /**
-
 
42
     * Workaround for <code>ATT######.dat</code> attachments.
-
 
43
     * 
-
 
44
     * @param props must currently be {@link System#getProperties()}.
-
 
45
     */
-
 
46
    static public final void setEncodedParametersForOutlook(final Properties props) {
-
 
47
        // don't use RFC 2231 for all parameters for 2 reasons :
-
 
48
        // 1. Outlook (at least 2007) doesn't support it. Thunderbird seems to get around this by
-
 
49
        // encoding the filename of Content-Disposition according to RFC 2231 and also encoding it
-
 
50
        // in Content-Type using the old de facto standard.
-
 
51
        // 2. Java Mail 1.6.0 doesn't always use Parameter Value Continuations (not for filenames :
-
 
52
        // javax.mail.internet.MimeBodyPart.setFileName() uses ParameterList.Value which isn't
-
 
53
        // split by toString())
-
 
54
        // used in ParameterList.encodeParameters
-
 
55
        props.setProperty("mail.mime.encodeparameters", "false");
-
 
56
        // since we don't use RFC 2231, use the old de facto standard to have a charset specified
-
 
57
        // somewhere.
-
 
58
        // used in MimeBodyPart.encodeFileName
-
 
59
        props.setProperty("mail.mime.encodefilename", "true");
-
 
60
    }
-
 
61
 
-
 
62
    /**
42
     * Parse the given exception to a more human readable format.
63
     * Parse the given exception to a more human readable format.
43
     * 
64
     * 
44
     * @param mex an exception.
65
     * @param mex an exception.
45
     * @return some useful informations.
66
     * @return some useful informations.
46
     */
67
     */