Skip to content

Commit

Permalink
bz-68462 Don't consider empty email addresses in mailer
Browse files Browse the repository at this point in the history
  • Loading branch information
jaikiran committed Feb 21, 2024
1 parent f96e494 commit 2dc4ca2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/org/apache/tools/ant/taskdefs/email/MimeMailer.java
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ private static InternetAddress[] internetAddresses(final Vector<EmailAddress> li
final List<InternetAddress> addrs = new ArrayList<>();

for (final EmailAddress addr : list) {
if (addr.getAddress().isEmpty()) {
// skip
continue;
}
final String name = addr.getName();
addrs.add((name == null)
? new InternetAddress(addr.getAddress())
Expand Down

0 comments on commit 2dc4ca2

Please sign in to comment.