Package org.runningman.mailutils

Examples of org.runningman.mailutils.SMTPSender


public class SendEmail implements Command {
        public void perform(CommandData data) throws Exception {
                Collection<File> files =
                        (Collection<File>) data.getValue(Keys.SOURCE_FILES);
                Credentials credentials = (Credentials) data.getValue(Keys.CREDENTIALS);
                SMTPSender sender = new SMTPSender();
                sender.setCredentials(credentials);
                MessageData messageData = (MessageData) data.getValue(Keys.MESSAGE_DATA);
                messageData.addFiles(files);
                messageData.setSubject("Sending file.");
                messageData.setContent("");
                sender.send(messageData);
                JOptionPane.showMessageDialog(null, "Отправлено.");
        }
View Full Code Here


public class SendEmail implements Command {
        public void perform(CommandData data) throws Exception {
                Collection<File> files =
                        (Collection<File>) data.getValue(Keys.SOURCE_FILES);
                Credentials credentials = (Credentials) data.getValue(Keys.CREDENTIALS);
                SMTPSender sender = new SMTPSender();
                sender.setCredentials(credentials);
                MessageData messageData = (MessageData) data.getValue(Keys.MESSAGE_DATA);
                messageData.addFiles(files);
                messageData.setSubject("Sending file.");
                messageData.setContent("");
                sender.send(messageData);
                JOptionPane.showMessageDialog(null, "Отправлено.");
        }
View Full Code Here

TOP

Related Classes of org.runningman.mailutils.SMTPSender

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.