Commons Email
  1. Commons Email
  2. EMAIL-98

Encoding and folding of headers should not be left to the user

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      Currently, folding and encoding of e-mail headers is completely left to the user. As commons-email is aimed at simplification of the Java Mail API, the encoding and folding issues should be taken care of by commons-email.

      The method buildMimeMessage() in Email.java should be changed as follows:

      if (this.headers.size() > 0)
      {
      Iterator iterHeaderKeys = this.headers.keySet().iterator();
      while (iterHeaderKeys.hasNext())

      { String name = (String) iterHeaderKeys.next(); String value = (String) headers.get(name); this.message.addHeader(name, MimeUtility.fold(name.length() + 2, MimeUtility.encodeText(value, this.charset, null))); }

      }

        Activity

        Mario Däpp created issue -
        Siegfried Goeschl made changes -
        Field Original Value New Value
        Assignee Siegfried Goeschl [ sgoeschl ]
        Siegfried Goeschl made changes -
        Fix Version/s 1.3 [ 12315052 ]
        Siegfried Goeschl made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Siegfried Goeschl made changes -
        Status In Progress [ 3 ] Open [ 1 ]
        Siegfried Goeschl made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Thomas Neidhart made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        80d 11h 55m 1 Siegfried Goeschl 15/Oct/10 21:05
        In Progress In Progress Open Open
        8d 2h 3m 1 Siegfried Goeschl 23/Oct/10 23:09
        Open Open Resolved Resolved
        8s 1 Siegfried Goeschl 23/Oct/10 23:09
        Resolved Resolved Closed Closed
        810d 17h 38m 1 Thomas Neidhart 11/Jan/13 15:47

          People

          • Assignee:
            Siegfried Goeschl
            Reporter:
            Mario Däpp
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development