Examples of addRecipients()


Examples of javax.mail.internet.MimeMessage.addRecipients()

      msg.setFrom(new InternetAddress(fromAddress));
      boolean atLeastOneRecipient = false;
      if (toList != null) {
        for (int i=0; i<toList.size(); i++) {
          String to = (String) toList.get(i);
          msg.addRecipients(javax.mail.Message.RecipientType.TO, InternetAddress.parse(to, false));
              if (log.isDebugEnabled()) {
                log.debug("to: " + to);
              }
          atLeastOneRecipient = true;
        }
View Full Code Here

Examples of javax.mail.internet.MimeMessage.addRecipients()

        }
      }
      if (ccList != null) {
        for (int i=0; i<ccList.size(); i++) {
          String cc = (String) ccList.get(i);
          msg.addRecipients(javax.mail.Message.RecipientType.CC, InternetAddress.parse(cc, false));
              if (log.isDebugEnabled()) {
                log.debug("cc: " + cc);
              }
          atLeastOneRecipient = true;
        }
View Full Code Here

Examples of javax.mail.internet.MimeMessage.addRecipients()

                     message.setFrom(from);
                     message.setReplyTo(new Address[]{from});

                     if (toAddresses != null)
                     {
                        message.addRecipients(Message.RecipientType.TO, InternetAddress.parse(toAddresses));
                     }

                     if (ccAddresses != null)
                     {
                        message.addRecipients(Message.RecipientType.CC, InternetAddress.parse(ccAddresses));
View Full Code Here

Examples of javax.mail.internet.MimeMessage.addRecipients()

                        message.addRecipients(Message.RecipientType.TO, InternetAddress.parse(toAddresses));
                     }

                     if (ccAddresses != null)
                     {
                        message.addRecipients(Message.RecipientType.CC, InternetAddress.parse(ccAddresses));
                     }

                     if (bccAddresses != null)
                     {
                        message.addRecipients(Message.RecipientType.BCC, InternetAddress.parse(bccAddresses));
View Full Code Here

Examples of javax.mail.internet.MimeMessage.addRecipients()

                        message.addRecipients(Message.RecipientType.CC, InternetAddress.parse(ccAddresses));
                     }

                     if (bccAddresses != null)
                     {
                        message.addRecipients(Message.RecipientType.BCC, InternetAddress.parse(bccAddresses));
                     }
                     Transport transport = session.getTransport("smtp");
                     if (doLogin)
                     {
                        transport.connect(serverHost, serverPort, serverUserName, serverPassword);
View Full Code Here

Examples of javax.mail.internet.MimeMessage.addRecipients()

    // 创建邮件体
    MimeMessage message = new MimeMessage(session);
    // 设置收发信人, 邮件标题等
    message.setFrom(new InternetAddress(from));

    message.addRecipients(MimeMessage.RecipientType.TO, to);
    if (cc != null) {
      message.addRecipients(MimeMessage.RecipientType.CC, cc);
    }
    message.setSubject(subject, encoding);
View Full Code Here

Examples of javax.mail.internet.MimeMessage.addRecipients()

    // 设置收发信人, 邮件标题等
    message.setFrom(new InternetAddress(from));

    message.addRecipients(MimeMessage.RecipientType.TO, to);
    if (cc != null) {
      message.addRecipients(MimeMessage.RecipientType.CC, cc);
    }
    message.setSubject(subject, encoding);

    // 创建邮件内容对象
    MimeMultipart multiPart = new MimeMultipart();
View Full Code Here

Examples of javax.mail.internet.MimeMessage.addRecipients()

            }
            mail.setFrom(new InternetAddress(sendFrom));
            mail.setSubject(subject, "UTF-8");
            mail.setHeader("X-Mailer", "Apache OFBiz, The Apache Open For Business Project");
            mail.setSentDate(new Date());
            mail.addRecipients(Message.RecipientType.TO, sendTo);

            if (UtilValidate.isNotEmpty(sendCc)) {
                mail.addRecipients(Message.RecipientType.CC, sendCc);
            }
            if (UtilValidate.isNotEmpty(sendBcc)) {
View Full Code Here

Examples of javax.mail.internet.MimeMessage.addRecipients()

            mail.setHeader("X-Mailer", "Apache OFBiz, The Apache Open For Business Project");
            mail.setSentDate(new Date());
            mail.addRecipients(Message.RecipientType.TO, sendTo);

            if (UtilValidate.isNotEmpty(sendCc)) {
                mail.addRecipients(Message.RecipientType.CC, sendCc);
            }
            if (UtilValidate.isNotEmpty(sendBcc)) {
                mail.addRecipients(Message.RecipientType.BCC, sendBcc);
            }
View Full Code Here

Examples of javax.mail.internet.MimeMessage.addRecipients()

            if (UtilValidate.isNotEmpty(sendCc)) {
                mail.addRecipients(Message.RecipientType.CC, sendCc);
            }
            if (UtilValidate.isNotEmpty(sendBcc)) {
                mail.addRecipients(Message.RecipientType.BCC, sendBcc);
            }

            if (UtilValidate.isNotEmpty(bodyParts)) {
                // check for multipart message (with attachments)
                // BodyParts contain a list of Maps items containing content(String) and type(String) of the attachement
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.