Examples of addTo()


Examples of org.apache.commons.mail.Email.addTo()

             "mail.smtp.starttls.enable", "true");
    }
        email.setFrom(from, "Wookie Server");
        email.setSubject("Wookie API Key");
        email.setMsg(message);
        email.addTo(to);
        email.send();
  }

}
View Full Code Here

Examples of org.apache.commons.mail.Email.addTo()

            email.setHostName("localhost");
            email.setSmtpPort(2525);
            email.setFrom(options.getFromEmail(), options.getFromName());
            email.setSubject("[test] " + render(options.getSubjectTemplate(), context));
            email.setMsg(render(options.getBodyTemplate(), context));
            email.addTo(toEmail);
            if (options.getReplyToEmail() != null)
            {
                email.setReplyTo(Arrays.asList(new InternetAddress(options.getReplyToEmail())));
            }
View Full Code Here

Examples of org.apache.commons.mail.Email.addTo()

            if (recipientList != null) {
                for (Object recipient : recipientList) {
                    try {
                        InternetAddress iAddress = new InternetAddress(recipient.toString());
                        email.addTo(iAddress.getAddress(), iAddress.getPersonal());
                    } catch (Exception e) {
                        email.addTo(recipient.toString());
                    }
                }
            } else {
View Full Code Here

Examples of org.apache.commons.mail.Email.addTo()

                for (Object recipient : recipientList) {
                    try {
                        InternetAddress iAddress = new InternetAddress(recipient.toString());
                        email.addTo(iAddress.getAddress(), iAddress.getPersonal());
                    } catch (Exception e) {
                        email.addTo(recipient.toString());
                    }
                }
            } else {
                throw new MailException("You must specify at least one recipient.");
            }
View Full Code Here

Examples of org.apache.commons.mail.HtmlEmail.addTo()

            mail.setSmtpPort(port);
            mail.setCharset(HtmlEmail.ISO_8859_1);
            for (String t : tos) {
                try {
                    mail.addTo(t, t);
                } catch (EmailException ex) {
                    System.err.print(ex);
                    return false;
                }
            }
View Full Code Here

Examples of org.apache.commons.mail.HtmlEmail.addTo()

        email.setMailSession(session);

        email.setFrom("test_from@apache.org");
        email.setSubject("Test Subject");
        email.addTo("test_to@apache.org");

        email.buildMimeMessage();
        final MimeMessage msg = email.getMimeMessage();

        final MimeMessageParser mimeMessageParser = new MimeMessageParser(msg);
View Full Code Here

Examples of org.apache.commons.mail.HtmlEmail.addTo()

        email.setMailSession(session);

        email.setFrom("test_from@apache.org");
        email.setSubject("Test Subject");
        email.addTo("test_to@apache.org");
        email.setTextMsg("My test message");

        email.buildMimeMessage();
        final MimeMessage msg = email.getMimeMessage();
View Full Code Here

Examples of org.apache.commons.mail.HtmlEmail.addTo()

        email.setMailSession(session);

        email.setFrom("test_from@apache.org");
        email.setSubject("Test Subject");
        email.addTo("test_to@apache.org");
        email.setTextMsg("My test message");
        email.setHtmlMsg("<p>My HTML message</p>");

        email.buildMimeMessage();
        final MimeMessage msg = email.getMimeMessage();
View Full Code Here

Examples of org.apache.commons.mail.MultiPartEmail.addTo()

        email.setHostName(mailhost);
        email.setAuthentication(username, password);
        email.setFrom(fromAddress, "MoDi");

        for (Role role : roles) {
            email.addTo(role.getEmail(), role.getName());
        }

        email.setSubject("[ MoDi ] "
                + Config.getStringProperty("MoDi.Meta.Project.Name"));
       
View Full Code Here

Examples of org.apache.commons.mail.SimpleEmail.addTo()

        email.setSubject(buildSubject(stream, checkResult, configuration, backlog));

        StringBuilder body = new StringBuilder();
        body.append(buildBody(stream, checkResult, backlog));
        email.setMsg(body.toString());
        email.addTo(emailAddress);

        email.send();
    }

    protected String buildSubject(Stream stream, AlertCondition.CheckResult checkResult, Configuration config, List<Message> backlog) {
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.