Commons Email
  1. Commons Email
  2. EMAIL-114

Methods to add multiple To, cc, Bcc is desired

    Details

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

      Description

      Currently if we have list of email address as string adding them to mail is possible only by looping or converting them as list of java.mail.internet.InternetAddress.

      Method like addTo(String[] emails) is desired.

        Activity

        Gokul Nanthakumar C created issue -
        Hide
        Gokul Nanthakumar C added a comment -

        Patch for new Methods addTo(String[]), addCc(String[]), addBcc(String[])

        Show
        Gokul Nanthakumar C added a comment - Patch for new Methods addTo(String[]), addCc(String[]), addBcc(String[])
        Gokul Nanthakumar C made changes -
        Field Original Value New Value
        Attachment arrayOfStringForAddresses.patch [ 12516923 ]
        Hide
        Thomas Neidhart added a comment -

        Applied patch with minor changes in r1416248:

        • throw an EmailException if the supplied array is null or empty
        • minor javadoc changes

        Thanks for the report and patch!

        Show
        Thomas Neidhart added a comment - Applied patch with minor changes in r1416248: throw an EmailException if the supplied array is null or empty minor javadoc changes Thanks for the report and patch!
        Thomas Neidhart made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.3 [ 12315052 ]
        Resolution Fixed [ 1 ]
        Hide
        Jochen Wiedmann added a comment -

        May I suggest that an IllegalArgumentException would be preferrable, so that we son't pollute the signature without need?

        Show
        Jochen Wiedmann added a comment - May I suggest that an IllegalArgumentException would be preferrable, so that we son't pollute the signature without need?
        Hide
        Thomas Neidhart added a comment -

        I tried to be consistent with the existing setXXX methods, and the EmailException is already thrown atm, but I agree, an IAE would be more logical.

        Show
        Thomas Neidhart added a comment - I tried to be consistent with the existing setXXX methods, and the EmailException is already thrown atm, but I agree, an IAE would be more logical.
        Thomas Neidhart made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        278d 15h 25m 1 Thomas Neidhart 02/Dec/12 20:24
        Resolved Resolved Closed Closed
        39d 19h 23m 1 Thomas Neidhart 11/Jan/13 15:47

          People

          • Assignee:
            Unassigned
            Reporter:
            Gokul Nanthakumar C
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development