コード例 #1
0
 static HtmlEmail removeRecipient(HtmlEmail email, String emailToRemove) throws EmailException {
   List<String> to = Utils.noGenericTypeToStringType(email.getToAddresses()),
       cc = Utils.noGenericTypeToStringType(email.getCcAddresses()),
       bcc = Utils.noGenericTypeToStringType(email.getBccAddresses());
   if (to.contains(emailToRemove)) {
     to.remove(emailToRemove);
     email.setTo(to);
   } else if (cc.contains(emailToRemove)) {
     cc.remove(emailToRemove);
     email.setCc(cc);
   } else if (bcc.contains(emailToRemove)) {
     bcc.remove(emailToRemove);
     email.setBcc(bcc);
   }
   return email;
 }
コード例 #2
0
ファイル: PHtmlEmail.java プロジェクト: lzpfmh/jphp
 @Signature
 public PHtmlEmail setBcc(List<InternetAddress> addresses) throws EmailException {
   htmlEmail.setBcc(addresses);
   return this;
 }