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, "Отправлено.");
}