• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

bbottema/simple-java-mail: Simple API, Complex Emails (Jakarta Mail smtp wrapper ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

bbottema/simple-java-mail

开源软件地址:

https://github.com/bbottema/simple-java-mail

开源编程语言:

Java 81.2%

开源软件介绍:

APACHE v2 License Latest Release Javadocs Codacy Java 1.7+

Simple Java Mail

Simple Java Mail is the simplest to use lightweight mailing library for Java, while being able to send complex emails including CLI support, authenticated socks proxy(!), attachments, embedded images, custom headers and properties, robust address validation, build pattern and even DKIM signing, S/MIME support and external configuration files with property overriding, Spring support and Email conversion tools. Just send your emails without dealing with RFCs.

The Simple Java Mail library is a thin layer on top of Jakarta Mail that allows users to define emails on a high abstraction level without having to deal with mumbo jumbo such as 'multipart' and 'mimemessage'.

simplejavamail.org

Simple Java Mail is also available in Maven Central:

<dependency>
    <groupId>org.simplejavamail</groupId>
    <artifactId>simple-java-mail</artifactId>
    <version>7.1.1</version>
</dependency>

Latest Progress

v7.1.0 - v7.1.1

  • v7.1.1 (27-March-2022)#387 Bug: memory leak in SMPT connection pool when 3rd party deallocation failed with exception
  • v7.1.0 (25-January-2022)#379 Maintenance: Adjust dependencies and make Java 9+ friendly

v7.0.1 - v7.0.2

  • v7.0.2 (25-January-2022): #329 Enhancement: Exceptions cause error-level logging in addition to rethrowing the exception, but should just include the message in a custom exception
  • v7.0.2 (25-January-2022): #378 Bug: package org.simplejavamail.internal.modules causes split package problem in Java9+
  • v7.0.1 (22-January-2022): #375 Bug: batch-module gives error when there is a custom mailer

v7.0.0 (2-January-2022)

It has been two years since the last major release, but 7.0.0 finally here!

What's new

Major features:

  • #322 Simple Java Mail migrated to Java 8 finally (see notes below)
  • #295 And also switched to JavaMail's successor Jakarta Mail 2.0.1 (see notes below)
  • #323 Solved the great CLI performance problem (now executes near instantly)
  • #319 Replaced the underlying regex-based email-address validation library with the lexer based JMail, which is faster, correcter, documented better and is more up-to-date with RFC's
  • #367 The sendMail/testConnection methods now have proper support for CompletableFuture

Bugfixes:

  • #352 Bug: names regex groups are not supported in Android JVM
  • #326 Bug: NullPointer when parsing Outlook Message with nested empty Outlook message
  • #330 Bug: cli expected --mailer arguments duplicated 3 times
  • #324 Bug: Add back missing log4j2 for CLI library

Maintenance:

  • #368 Resolve log4j (Java8) vulnerability in Simple Java Mail's CLI module
  • #330 Improved feedback from failing CLI commands
  • #327 Implement toString() for Mailer instances for debugging purposes

About the migration

Updating to Java8/Jakarta 2.0.1 posed a challenge as the 3rd party S/MIME library java-utils-mail-smime has been abandoned/archived while developing Simple Java Mail. Furthermore, it was still under LGPL3 license while everything else is ApacheV2.

Thankfully, I obtained permissions from the maintainers -as well as original developers from decades ago on SourceForge- to take both java-utils-mail-smime and java-utils-mail-dkim under my wings at Simple Java Mail and change the licensing model! You can now post issues and pull requests here:

v6.7.0 - v6.7.6

  • v6.7.6 (22-January-2022): #375 Bug: batch-module gives error when there is a custom mailer
  • v6.7.5 (26-December-2021): #338 Enhancement: Also return AsyncResponse from plain Mailer.sendEmail(singleArgument) as async can be configured through MailerBuilder now
  • v6.7.4 (25-December-2021): #331 Enhancement: Coalesce empty SMTP server arguments to null to support CLI better
  • v6.7.3 (25-December-2021): #335 Bugfix: Precondition nonNull check also checks nonEmpty and breaks on clearEmailAddressCriteria
  • v6.7.2 (25-December-2021): #318 Maintenance: Allow zero data attachments so Outlook message conversions don't crash and burn
  • v6.7.1 (25-December-2021): #346 Bugfix: Add option to parse MimeMessage without fetching attachment data from server - Properly return named datasource without fetching all the data if unwanted
  • v6.7.0 (25-December-2021): #356 Enhancement: Improve for support for Android < 8.0 (Fix NoClassDefFoundError)
  • v6.7.0 (25-December-2021): #351 Bugfix: emlToEmail() and mimeMessageToEmail() break on mesages with duplicate names and legacy empty nested messages
  • v6.7.0 (25-December-2021): #347 Maintenance: Reduce log-spam and prevent exception on every module availability check
  • v6.7.0 (25-December-2021): #346 Feature: Add option to parse MimeMessage without fetching attachment data from server

v6.6.0 - v6.6.2

  • v6.6.2 (23-December-2021): #365 Security: Resolve log4j vulnerability in Simple Java Mail
  • v6.6.1 (12-June-2021): #321 Enhancement: Ignore malformed recipient addresses and continue parsing email data
  • v6.6.0 (1-June-2021): #320 Enhancement: Added default S/MIME signing to Mailer level and fixed crippling performance bug

v6.5.0 - v6.5.4

  • v6.5.4 (22-May-2021): #315 Enhancement: Nested attachments of Outlook message attachments are now preserved as standard EML MimeMessage attachments

    NOTE: This removes the Kryo dependency

  • v6.5.3 (4-May-2021): #314 Bugfix: Nested attachments of Outlook message attachments are now preserved, by utilizing Kryo

    NOTE: This add Kryo as extra dependency to the outlook-module (and is subsequently removed in 6.5.4)

  • v6.5.2 (15-April-2021): #311 Bugfix: text/calendar as string -> ClassCastException (if calendar type is not Inputstream)

  • v6.5.1 (10-April-2021): #307 / #310 Bugfix: embedded image resource name got mangled

  • v6.5.0 (16-February-2021): #298 Enhancement: Nested Outlook messages aren't discarded anymore, but parsed to serialized Email objects

  • v6.5.0 (16-February-2021): #292 Bugfix: NullPointerException in SmimeUtilFixed when protocol is missing (which is valid)

  • v6.5.0 (16-February-2021): #289 Bugfix: Support multiple headers with same key

This release breaks all GET/SET api regarding headers used as map (Map<String, T> -> Map<String, Collection<T>>) This release might break api in the rare case you relied on the attachment list and you have nested Outlook .msg attachments (previously omitted in the results)

v6.4.0 - v6.4.5

  • v6.4.5 (13-Februari-2021): #306 Maintenance: Update outlook-message-parser to 1.7.9
  • v6.4.5 (13-Februari-2021): #304 Regression bugfix: batch-module needed for sending mails async, basic version should work without
  • v6.4.5 (13-Februari-2021): #303 Bugfix: EML Attachments are modified/have the wrong size
  • v6.4.4 (25-October-2020): #294 Always invoke async success/exception handlers even if set after sending email (behaving more like promises/futures)
  • v6.4.4 (25-October-2020): #291 On Exception only log the email ID at error level and log the whole email at trace level
  • v6.4.4 (25-October-2020): #290 Only perform expensive logging logic if respective logging level is enabled
  • v6.4.3 (6-August-2020): #284 Improved support for Calendar attachments created by gMail
  • v6.4.3 (6-August-2020): #283 Bugfix: Fix support for reading Calendar attachments with quoted-printable transfer-type
  • v6.4.2 (3-August-2020): #281 Bugfix: Fix support for reading Calendar attachments
  • v6.4.1 (26-July-2020): #252 Bugfix: Added missing support for S/MIME enveloped signing
  • v6.4.0 (19-July-2020): #268 Immediately resolve InputStreams when building emails, don't reuse
    • This primarily affects the builder api for S/MIME and DKIM signing / encryption.

v6.3.0 - v6.3.2 (11-July-2020 - 12-July-2020)

  • #271 Bugfix: Attachment (file)names with special characters should not be encoded
  • #248 Bugfix: MimeMessageHelper: use complete filename as resource name
  • #279 Allow extra Session properties configured through simplejavamail.properties
  • #277 Add API for using custom SSLSocketFactory

v6.2.0 (9-July-2020)

This release adds the following major new feature:

  • #260 Add support for dynamic datasource resolution (file/url/classpath) for embedded images in HTML body

v6.1.0 (5-July-2020)

  • #264 Switch from AssertionError to IllegalStateException
  • Bumped outlook-message-parser from 1.7.3 to 1.7.5
    • bugfix for parsing chinese unsent Outlook messages
    • bugfix Outlook attachments with special characters in the name
  • Bumped email-rfc2822-validator from 2.1.3 to 2.2.0
    • bugfix properly handle brackets in email addresses when allowed
  • Bumped log4j-core from 2.6.1 to 2.13.2

v6.0.2 - v6.0.5 (21-January-2020 - 13-June-2020)

  • #270 Bug: CLI module missing Jetbrains @Nullable annotation dependency needed in runtime
  • #262 Bug: Executor settings passed to the builder are ignored
  • #249 Bug: MimeMessageParser doesn't handle multiple attachments with the same name correctly
  • #245 Bug: JDK9+ Incorrect JPMS Automatic-Module-Name
  • #246 Bug: Sending async emails with and without the Batch module cause lingering threads

v6.0.0-rc1 - v6.0.1 (18-December-2019 - 24-January-2020)

After almost two years of development the next major release 6.0.0 is finally here! And what a doozy it is, with the following major new features:

The core library is now even smaller compared to the 5.x.x series going from 183kb to 134kb!

Here's the complete list of changes:

New features and enhancements

  • #183 To manage all the optional dependencies and related code, Simple Java Mail should be split up into modules
  • #156 Add CLI support
  • #214 Support more advanced batch processing use cases
  • #187 Simple Java Mail should have optional support for signed S/MIME attachments
  • #121 Introduce interfaces for validation and sending, so these steps can be customized
  • #144 Simple Java Mail should tailor the MimeMessage structure to specific needs
  • #138 Add support for Calendar events (iCalendar vEvent)
  • #235 Be able to fix the sent date for a new email
  • #232 Improve encoding of attachment file names
  • #222 Add config property support for trusting hosts and verifying server identity
  • #212 Authenticated proxy server started even if already running, raising exception
  • #207 Implement more comprehensive ThreadPoolExecutor and expose config options
  • #211 SpringSupport should expose the intermediate builder for customization
  • #193 Simple Java Mail should use default server ports when not provided by the user

Bugs solved

  • #242 Renamed log4j2.xml to log4j2_example.xml so it doesn't clash with project config
  • #241 EmailConverter.outlookMsgToEmail duplicates recipients
  • #239 List of Recipients not ordered as added (insertion order not maintained)
  • #236 Message ID should be mapped from Outlook messages as well
  • #210 Connection/session timeout properties not set when not sending in batch mode
  • #201 When parsing Outlook message, FROM address should default to a dummy address when missing
  • #200 When parsing Outlook message, attachment name doesn't fallback on filename if proper name is empty
  • #161 When reading (chinese) .msg files, HTML converted from RTF is completely garbled (encoding issue)
  • #159 Can not parse email with blank email address headers
  • #139 Multiple Bodyparts of same Content-Type not supported for text/html & text/plain within Multipart/mixed or Multipart/alternative
  • #151 Attachment's file extension overwritten by resource's invalid extension

Maintenance updates

  • #165 Move away from Findbugs (unofficial JSR-305) annotations
  • #164 The DKIM dependency has been updated to benefit from the newer Apache V2 license
  • #164 The DKIM dependency has been updated to benefit from the newer Apache V2 license
  • #184 Update JavaMail dependency to 1.6.2, adding support for UTF-8 charset
  • #186 Update JavaMail dependency to 1.6.2, adding support for authenticated HTTP web proxy
  • #146 Added OSGI manifest and switched to spotbugs

Included changes from outlook-message-parser

  • v6.0.1, v1.7.3: #27 When from name/address are not available (unsent emails), these fields are filled with binary garbage
  • v6.0.1, v1.7.2: #26 To email address is not handled properly when name is omitted
  • v6.0.0, v1.7.1: #25 NPE on ClientSubmitTime when original message has not been sent yet
  • v6.0.0, v1.7.1: #23 Bug: _nameid directory should not be parsed (and causing invalid HTML body)
  • v6.0.0, v1.7.0: #18 Upgrade Apache POI 3.9 -> 4.x (but managed back for Simple Java Mail due to incompatibility with Java 7)
  • v6.0.0, v1.6.0: #21 Multiple TO recipients are not handles properly
  • v6.0.0, v1.5.0: #20 CC and BCC recipients are not parsed properly
  • v6.0.0, v1.5.0: #19 Use real Outlook ContentId Attribute to resolve CID Attachments
  • v6.0.0, v1.4.1: #17 Fixed encoding error for UTF-8's Windows legacy name (cp)65001
  • v6.0.0, v1.4.0: #9 Replaced the RFC to HTML converter with a brand new RFC-compliant convert! (thanks to @fadeyev!)
  • v6.0.0, v1.3.0: #14 Dependency problem with Java9+, missing Jakarta Activation Framework
  • v6.0.0, v1.3.0: #13 HTML start tags with extra space not handled correctly
  • v6.0.0, v1.3.0: #11 SimpleRTF2HTMLConverter inserts too many
    tags
  • v6.0.0, v1.3.0: #10 Embedded images with DOS-like names are classified as attachments
  • v6.0.0, v1.3.0: #9 SimpleRTF2HTMLConverter removes some valid tags during conversion
  • v6.0.0, v1.2.1: Ignore non S/MIME related content types when extracting S/MIME metadata
  • v6.0.0, v1.2.1: Added toString and equals methods to the S/MIME data classes
  • v6.0.0, v1.1.21: Upgraded mediatype recognition based on file extension for incomplete attachments
  • v6.0.0, v1.1.21: Added / improved support for public S/MIME meta data
  • v6.0.0, v1.1.20: #7 Fix missing S/MIME header details that are needed to determine the type of S/MIME application
  • v6.0.0, v1.1.19: Log rtf compression error, but otherwise ignore it and keep going and extract what we can.

A big shout out to @dnault (runtime javadoc), @remkop (picocli) and @markenwerk (S/MIME and DKIM) for working with me to make the libraries work with JDK7+ and do what Simple Java Mail needed! Finally a great many thanks the numerous contributors on Simple Java Mail as well as outlook-message-parser - this release would not be there without you.

v5.5.0 - v5.5.1

  • v5.5.1 (20-October-2019): #230 Bugfix: Missing address value in address headers (ie. Return-Path) not handled properly, resulting in Exception
  • v5.5.0 (15-October-2019): #229 Bugfix: Timeouts not working for synchronous sendMail calls.

If you had connection properties configured for non-async send jobs, only now they will actually start to take effect.

v5.4.0 (28-August-2019)

  • #221 API bugfix: server identity verification should not be tied to host trusting
  • #226 Bug fix: Attachments with spaces in name are not handled properly
  • #218 Enhancement: make Email serializable
  • #227 Enhancement: Make parsing recipients from EML file more lenient
  • #225 Enhancement: Clarify dependency on Jakarta Activation: DataSources no longer work on Java 9+

v5.3.0 (16-August-2019)

  • #215 Bug: Current DKIM header canonicalization can lead to invalid DKIM

Note this release should have no impact, but nonetheless is a minor update so you can determine for yourself if this update would cause issues. The release changes DKIM header canonicalization from SIMPLE to RELAXED.

v5.2.1 (16-August-2019)

  • #219 Bug: MimeMessageParser rejects attachments with duplicate names

v5.2.0 (7-July-2019)

  • #213 Update from javax.mail:1.6.0 to jakarta.mail:1.6.3

Note that dependencies that switched as well have been updated as part of this change. This includes the optional DKIM library and the email validation library:

  • net.markenwerk:utils-mail-dkim (1.1.10 -> 1.2.0)
  • com.github.bbottema:emailaddress-rfc2822 (1.1.2 -> 2.1.3)

v5.1.1 - v5.1.7

  • v5.1.7 (22-May-2019): #171 Header validation tripping on known safe emails due to References header
  • v5.1.6 (27-April-2019): #204 A Concurrent exception when an async process starts when the previous connection pool didn't shutdown in time
  • v5.1.6 (27-April-2019): #204 B Exceptions in threads are now caught and logged and don't bubble up anymore. Note that more comprehensive exception handling will be available in 6.0.0 (#148).
  • v5.1.5 (24-April-2019): #202 Fixed ConcurrentModificationException when moving invalid embedded images as regular attachments
  • v5.1.4 (5-April-2019): #163 Fixed missing mimetype for attachments when parsing Outlook messages where mimeTag was not included
  • v5.1.3 (15-Januari-2019): Updated to newer rfc-validator version, which fixed a regression bug in that library
  • v5.1.2 (9-Januari-2019): #189 Bugfix for missing timeout config for .testConnection() function
  • v5.1.1 (22-December-2018): #190 Fix for transitive dependency clash because of emailaddress-rfc2822 library

v5.1.0 (21-November-2018)

  • #179 You can now test the connection to the SMTP server

v5.0.1 - v5.0.8

  • v5.0.8 (27-Oktober-2018): #178 Fix the annoying vulnerability Github report about spring-core
  • v5.0.7 (27-Oktober-2018): #175 Attachment names are not always parsed properly from MimeMessage
  • v5.0.6 (3-Oktober-2018): #167 Email addresses validated despite cleared validation validation criteria
  • v5.0.5 (3-Oktober-2018): #137 When replying to an email with HTML, the result body is empty
  • v5.0.4 (22-September-2018): #168 Properties aquired through ConfigLoader should be typed explicitly and converted if necessary
  • v5.0.3 (11-April-2018): #136 ServerConfig class should be public API
  • v5.0.2 (7-April-2018): #135 trustingAllHosts should be public on the Builder API
  • v5.0.2 (7-April-2018): #131 NamedDataSource should implement EncodingAware
  • v5.0.1 (10-March-2018): #130 java.lang.ClassNotFoundException: net.markenwerk.utils.mail.dkim.DkimMessage. Solves the issue of missing optional class DKIM even when not used

v5.0.0 (14-Februari-2018)

Also see the migration notes

New features

  • #116 You can now test the connection to the SMTP server
  • #115 Create mailers with a very robust MailerBuilder API, able to ignore defaults as well
  • #114 Create emails with a very robust EmailBuilder API, able to ignore defaults as well. Now includes support for InternetAddress. Also copy emails.
  • #107 You can now easily forward or reply to emails!

Security updates

  • #111 Protocol properties for SMTPS are now applied properly
  • #105 SMTP tries to upgrade to TLS while SMTP_TLS now enforces it and for both SMTP_TLS and SMTPS, mail.smtp.ssl.checkserveridentity is set to true

Maintenance updates

Complete Javadoc overhaul. Navigating the Javadoc should be much more consistent now (builder API being the single public source of truth).

  • #122 The email-rfc2822-validator library has been made a proper Maven dependency (not packaged along anymore)
  • #120 The DKIM library has been made an optional proper Maven dependency (not packaged along anymore)
  • #119 Switched optional Spring dependency version to property and now testing with 4.3.11.RELEASE
  • #113 Updated the underlying JavaMail to 1.6.0

Bugfi


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Devskiller/jfairy: Java fake data generator发布时间:2022-06-23
下一篇:
yomorun/hashids-java: Hashids algorithm v1.0.0 implementation in Java发布时间:2022-06-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap