Package com.serotonin.web.mail

Examples of com.serotonin.web.mail.EmailContent


            Set<String> addresses = new MailingListDao().getRecipientAddresses(reportConfig.getRecipients(),
                    new DateTime(reportInstance.getReportStartTime()));
            String[] toAddrs = addresses.toArray(new String[0]);

            // Create the email content object.
            EmailContent emailContent = new EmailContent(null, creator.getHtml(), Common.UTF8);

            // Add the consolidated chart
            if (creator.getImageData() != null)
                emailContent
                        .addInline(new EmailInline.ByteArrayInline(inlinePrefix + ReportChartCreator.IMAGE_CONTENT_ID,
                                creator.getImageData(), ImageChartUtils.getContentType()));

            // Add the point charts
            for (PointStatistics pointStatistics : creator.getPointStatistics()) {
                if (pointStatistics.getImageData() != null)
                    emailContent.addInline(new EmailInline.ByteArrayInline(inlinePrefix
                            + pointStatistics.getChartName(), pointStatistics.getImageData(), ImageChartUtils
                            .getContentType()));
            }

            // Add optional images used by the template.
View Full Code Here

TOP

Related Classes of com.serotonin.web.mail.EmailContent

Copyright © 2018 www.massapicom. 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.