This is my function to prepare recipient list.

```
public static InternetAddress[] getRecipienEmail(boolean flag) {
        dbconf conf = new dbconf();
        try {
            String sql = null;
            if (flag) {
                sql = "select email_id from EMP_EMAIL_TEST WHERE to_char(dob,'MM-DD')=to_char(sysdate,'MM-DD')";
            } else {
                sql = "select email_id from EMP_EMAIL_TEST WHERE to_char(dob,'MM-DD')<>to_char(sysdate,'MM-DD') or DOB is NULL";
            }

            PreparedStatement preStatement = conf.getConnection().prepareStatement(sql);

            ResultSet result = preStatement.executeQuery();
            ArrayList email = new ArrayList();
            while (result.next()) {
                email.add(result.getString("email_id"));
            }
            InternetAddress[] address = new InternetAddress[email.size()];
            for (int i = 0; i < email.size(); i++) {
                address[i] = new InternetAddress(email.get(i).toString());
            }
            conf.getConnection().close();
            return address;
        } catch (SQLException | AddressException ex) {
           System.out.println(ex.getMessage());
            Logger.getLogger(EmpEmail.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;

    }

```

When I'm getting **Invalid Recipient** error. 

This is how I'm calling above function. Please suggest, what is wrong here

```
message.setRecipients(Message.RecipientType.TO,
                    EmpEmail.getRecipienEmail(true));

```

Please Note: Table has list of emails and It will always return at least one email address.

**Update:**

I found probable issue. I just found that after below line of code, application through exception.

```
message.setReplyTo(cc);

```

I'm using same list of emails in Reply-to. Can't I use multiple email address in Reply-To ?