Package javax.mail.internet

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


            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

        log.info("SENDING message from " + from + " to " + to);

        MimeMessage msg = new MimeMessage(session);

        msg.setHeader("transport.mail.soapaction", soapAction);
        msg.addRecipients(Message.RecipientType.TO, to);
        msg.setSubject(subject);
        msg.setText(content);
        Transport.send(msg);
    }
View Full Code Here

             * Could use alias names: Address address = new
             * InternetAddress("president@whitehouse.gov", "Barack Obama");
             */

            if (_to != null && !_to.isEmpty()) {
                message.addRecipients(Message.RecipientType.TO, _to.toArray(new InternetAddress[_to.size()]));
            }
            else {
                throw new WGMailException("MAIL ERROR: No address to send mail to.");

            }
View Full Code Here

                throw new WGMailException("MAIL ERROR: No address to send mail to.");

            }

            if (_cc != null && !_cc.isEmpty()) {
                message.addRecipients(Message.RecipientType.CC, _cc.toArray(new InternetAddress[_cc.size()]));
            }

            if (_bcc != null && !_bcc.isEmpty()) {
                message.addRecipients(Message.RecipientType.BCC, _bcc.toArray(new InternetAddress[_bcc.size()]));
            }
View Full Code Here

            if (_cc != null && !_cc.isEmpty()) {
                message.addRecipients(Message.RecipientType.CC, _cc.toArray(new InternetAddress[_cc.size()]));
            }

            if (_bcc != null && !_bcc.isEmpty()) {
                message.addRecipients(Message.RecipientType.BCC, _bcc.toArray(new InternetAddress[_bcc.size()]));
            }

            if (_replyTo != null) {
                message.setReplyTo(new InternetAddress[] {_replyTo});
            }
View Full Code Here

            }
            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

            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

            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

        log.info("SENDING message from " + from + " to " + to);

        MimeMessage msg = new MimeMessage(session);

        msg.setHeader("transport.mail.soapaction", soapAction);
        msg.addRecipients(Message.RecipientType.TO, to);
        msg.setSubject(subject);
        msg.setText(content);
        Transport.send(msg);
    }
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.