On Tue, 27 Aug 2019 at 12:02, Pavlo Polishchuk <[email protected]> wrote: > > Good day, > Is there a way to unset CC/BCC through "org.apache.commons.mail.Email" ? > > I tried "email.setCC" with empty collection but there is a check for > null/empty collection inside. > Also, tried to "email.getMimeMessage().setRecipients(...)" but this fails > with NPE since MimeMessage is not build at that time. > > Do I miss something?
The underlying list is accessible as a protected field and via code of the form: List list = email.getBccAddresses(); so it's easy enough to clear the list if required. An alternative is not to set the list in the first place ... > Thanks in advance! > > -- > Best regards, > Paul --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
