EverIT Maven OSS
EverIT Maven OSS
API for handling Emails in Java easily. Currently the API contains Email sending functionality.
Email email = new Email().withSubject("I need coffee"); // Add the sender with builder pattern email.from = new EmailAddress().withAddress("").withPersonal("Foo Bar"); // Add some recipients with builder pattern email.recipients = new Recipients() .withTo(Arrays.asList(new EmailAddress[] { new EmailAddress().withAddress("")})) .withCc(Arrays.asList(new EmailAddress[] { new EmailAddress().withAddress("")}));
email.withTextContent("I really need coffee");
MapinlineImages = new HashMap<>; inlineImages.put("ineedcoffee", new Attachment() .withContentType("image/jpg") .withName("ineedcoffee.jpg" .withInputStreamSupplier(() -> new FileInputStream("/tmp/ineedcoffee.jpg")))); email.withHtmlContent(new HtmlContent() .withHtml(" I really need coffee
" + "") .withInlineImageByCidMap();
email.withAttachments(Arrays.aslist( new Attachment() .withContentType("application/pdf") .withName("readme.pdf" .withInputStreamSupplier(() -> new FileInputStream("/tmp/readme.pdf"))));
EmailSender emailSender = getSomeEmailSenderImplementation(); emailSender.sendEmail(email);
At the moment, an implementation based on JavaMail API is available. In the future, we are planning to have a more lightweight module that implements the necessary parts of SMTP protocol directly.
Binaries are available on Maven Central.
You can browse the Javadoc at the apidocs page.
Source code is hosted on .