Uploaded image for project: 'Commons Email'
  1. Commons Email
  2. EMAIL-114

Methods to add multiple To, cc, Bcc is desired

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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

        Hide
        gokulnanthakumar Gokul Nanthakumar C added a comment -

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

        Show
        gokulnanthakumar Gokul Nanthakumar C added a comment - Patch for new Methods addTo(String[]), addCc(String[]), addBcc(String[])
        Hide
        tn 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
        tn 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!
        Hide
        jochen@apache.org 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@apache.org 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
        tn 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
        tn 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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development