Package com.typesafe.plugin

Examples of com.typesafe.plugin.MailerAPI.addAttachment()


            if (mail.getReplyTo() != null) {
                api.setReplyTo(mail.getReplyTo());
            }
            for (final Mail.Attachment attachment : mail.getAttachments()) {
                if (attachment.getData() != null) {
                    api.addAttachment(attachment.getName(), attachment.getData(), attachment.getMimeType(), attachment.getDescription(), attachment.getDisposition());
                } else {
                    api.addAttachment(attachment.getName(), attachment.getFile(), attachment.getDescription(), attachment.getDisposition());
                }
            }
            if (mail.getBody().isBoth()) {
View Full Code Here


            }
            for (final Mail.Attachment attachment : mail.getAttachments()) {
                if (attachment.getData() != null) {
                    api.addAttachment(attachment.getName(), attachment.getData(), attachment.getMimeType(), attachment.getDescription(), attachment.getDisposition());
                } else {
                    api.addAttachment(attachment.getName(), attachment.getFile(), attachment.getDescription(), attachment.getDisposition());
                }
            }
            if (mail.getBody().isBoth()) {
                // sends both text and html
                api.send(mail.getBody().getText(), mail.getBody().getHtml());
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.