Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 106 additions & 103 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,104 +1,107 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!---
+======================================================================+
|**** ****|
|**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
|**** DO NOT EDIT DIRECTLY ****|
|**** ****|
+======================================================================+
| TEMPLATE FILE: readme-md-template.md |
| commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+======================================================================+
| |
| 1) Re-generate using: mvn commons:readme-md |
| |
| 2) Set the following properties in the component's pom: |
| - commons.componentid (required, alphabetic, lower case) |
| - commons.release.version (required) |
| |
| 3) Example Properties |
| |
| <properties> |
| <commons.componentid>math</commons.componentid> |
| <commons.release.version>1.2</commons.release.version> |
| </properties> |
| |
+======================================================================+
--->
Apache Commons Email
===================

[![Build Status](https://travis-ci.org/apache/commons-email.svg?branch=trunk)](https://travis-ci.org/apache/commons-email)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-email/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-email/)

<!---
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!---
+======================================================================+
|**** ****|
|**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
|**** DO NOT EDIT DIRECTLY ****|
|**** ****|
+======================================================================+
| TEMPLATE FILE: readme-md-template.md |
| commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+======================================================================+
| |
| 1) Re-generate using: mvn commons-build:readme-md |
| |
| 2) Set the following properties in the component's pom: |
| - commons.componentid (required, alphabetic, lower case) |
| - commons.release.version (required) |
| |
| 3) Example Properties |
| |
| <properties> |
| <commons.componentid>math</commons.componentid> |
| <commons.release.version>1.2</commons.release.version> |
| </properties> |
| |
+======================================================================+
--->
Apache Commons Email
===================

[![Travis-CI Status](https://travis-ci.org/apache/commons-email.svg)](https://travis-ci.org/apache/commons-email)
[![GitHub Actions Status](https://github.com/apache/commons-email/workflows/Java%20CI/badge.svg)](https://github.com/apache/commons-email/actions)
[![Coverage Status](https://coveralls.io/repos/apache/commons-email/badge.svg)](https://coveralls.io/r/apache/commons-email)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-email/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-email/)
[![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-email/2.0.0.svg)](https://javadoc.io/doc/org.apache.commons/commons-email/2.0.0)

Apache Commons Email aims to provide an API for sending email. It is built on top of
the JavaMail API, which it aims to simplify.
Documentation
-------------
More information can be found on the [Apache Commons Email homepage](https://commons.apache.org/proper/commons-email).
The [Javadoc](https://commons.apache.org/proper/commons-email/javadocs/api-release) can be browsed.
Questions related to the usage of Apache Commons Email should be posted to the [user mailing list][ml].
Where can I get the latest release?
-----------------------------------
You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-email/download_email.cgi).
Alternatively you can pull it from the central Maven repositories:
```xml
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>1.5</version>
</dependency>
```
Contributing
------------
We accept Pull Requests via GitHub. The [developer mailing list][ml] is the main channel of communication for contributors.
There are some guidelines which will make applying PRs easier for us:
+ No tabs! Please use spaces for indentation.
+ Respect the code style.
+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
+ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn clean test```.
If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
License
-------
This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).
See the `NOTICE.txt` file for required notices and attributions.
Donations
---------
You like Apache Commons Email? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.
Additional Resources
--------------------
+ [Apache Commons Homepage](https://commons.apache.org/)
+ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/EMAIL)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
+ `#apache-commons` IRC channel on `irc.freenode.org`
[ml]:https://commons.apache.org/mail-lists.html
the JavaMail API, which it aims to simplify.

Documentation
-------------

More information can be found on the [Apache Commons Email homepage](https://commons.apache.org/proper/commons-email).
The [Javadoc](https://commons.apache.org/proper/commons-email/apidocs) can be browsed.
Questions related to the usage of Apache Commons Email should be posted to the [user mailing list][ml].

Where can I get the latest release?
-----------------------------------
You can download source and binaries from our [download page](https://commons.apache.org/proper/commons-email/download_email.cgi).

Alternatively you can pull it from the central Maven repositories:

```xml
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>2.0.0</version>
</dependency>
```

Contributing
------------

We accept Pull Requests via GitHub. The [developer mailing list][ml] is the main channel of communication for contributors.
There are some guidelines which will make applying PRs easier for us:
+ No tabs! Please use spaces for indentation.
+ Respect the code style.
+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
+ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn clean test```.

If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).

License
-------
This code is under the [Apache Licence v2](https://www.apache.org/licenses/LICENSE-2.0).

See the `NOTICE.txt` file for required notices and attributions.

Donations
---------
You like Apache Commons Email? Then [donate back to the ASF](https://www.apache.org/foundation/contributing.html) to support the development.

Additional Resources
--------------------

+ [Apache Commons Homepage](https://commons.apache.org/)
+ [Apache Issue Tracker (JIRA)](https://issues.apache.org/jira/browse/EMAIL)
+ [Apache Commons Twitter Account](https://twitter.com/ApacheCommons)
+ `#apache-commons` IRC channel on `irc.freenode.org`

[ml]:https://commons.apache.org/mail-lists.html
17 changes: 17 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,23 @@ current users are encouraged to upgrade.
For the security bugfix see
https://commons.apache.org/proper/commons-email/security-reports.html#Fixed_in_Apache_Commons_Email_1.5

CHANGES FROM 2.0:
-----------------

== Compatibility ==

* JavaMail dependency has been upgraded to version 2.0.1,
as a consequence, all types javax.mail.* changed to jakarta.mail.* and
the maven dependency has changed to:

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>2.0.1</version>
</dependency>

CHANGES FROM 1.6:

CHANGES FROM 1.5:

* Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility.
Expand Down
2 changes: 1 addition & 1 deletion conf/findbugs-exclude-filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!-- when converting a string into a byte[] -->
<Match>
<Class name="org.apache.commons.mail.util.MimeMessageUtils" />
<Method name="createMimeMessage" params="javax.mail.Session, java.lang.String" returns="javax.mail.internet.MimeMessage" />
<Method name="createMimeMessage" params="jakarta.mail.Session, java.lang.String" returns="jakarta.mail.internet.MimeMessage" />
<Bug pattern="DM_DEFAULT_ENCODING" />
</Match>

Expand Down
34 changes: 15 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>commons-email</artifactId>
<version>1.6-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<name>Apache Commons Email</name>

<inceptionYear>2001</inceptionYear>
<description>
Apache Commons Email aims to provide an API for sending email. It is built on top of
the JavaMail API, which it aims to simplify.
the Jakarta Mail API, which it aims to simplify.
</description>

<url>https://commons.apache.org/proper/commons-email/</url>
Expand Down Expand Up @@ -157,7 +157,7 @@
<email>ggregory at apache.org</email>
<url>https://www.garygregory.com</url>
<organization>The Apache Software Foundation</organization>
<organizationUrl>https://www.apache.org/</organizationUrl>
<organizationUrl>https://www.apache.org/</organizationUrl>
<roles>
<role>PMC Member</role>
</roles>
Expand Down Expand Up @@ -245,7 +245,7 @@
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>1.6.7</version>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand All @@ -265,17 +265,12 @@
<version>2.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.subethamail</groupId>
<artifactId>subethasmtp</artifactId>
<version>3.1.7</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
</exclusions>

<dependency>
<groupId>com.github.davidmoten</groupId>
<artifactId>subethasmtp</artifactId>
<version>6.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
Expand Down Expand Up @@ -306,8 +301,8 @@
<commons.module.name>org.apache.commons.mail</commons.module.name>
<commons.jira.id>EMAIL</commons.jira.id>
<commons.jira.pid>12310474</commons.jira.pid>
<commons.release.version>1.6.0</commons.release.version>
<commons.release.desc>(Java 7)</commons.release.desc>
<commons.release.version>2.0.0</commons.release.version>
<commons.release.desc>(Java 8)</commons.release.desc>
<commons.rc.version>RC1</commons.rc.version>

<!-- override the default commons encoding property -->
Expand All @@ -322,7 +317,8 @@
</properties>

<build>
<defaultGoal>clean verify apache-rat:check clirr:check spotbugs:check javadoc:javadoc</defaultGoal>
<!-- TODO: return back `apache-rat:check clirr:check` after the release -->
<defaultGoal>clean verify spotbugs:check javadoc:javadoc</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -542,7 +538,7 @@
</plugins>
</build>
</profile>

<profile>
<id>rc</id>
<distributionManagement>
Expand Down
2 changes: 1 addition & 1 deletion src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</properties>

<body>
<release version="1.6.0" date="YYYY-MM-DD" description="Feature release (Java 8).">
<release version="2.0.0" date="Not yet released, update from javax.mail to jakarta.mail.">
<action issue="EMAIL-190" type="update" due-to="sgoeschl">
Fix broken JDK 9 build by updating "easymock" and other dependencies.
</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;

import javax.activation.DataSource;
import jakarta.activation.DataSource;

/**
* This class implements a typed DataSource from:<br>
Expand All @@ -39,7 +39,7 @@
* and it is recommended to do so.
*
* @since 1.0
* @deprecated since 1.4, use {@link javax.mail.util.ByteArrayDataSource} instead
* @deprecated since 1.4, use {@link jakarta.mail.util.ByteArrayDataSource} instead
*/
@Deprecated
public class ByteArrayDataSource implements DataSource
Expand All @@ -55,7 +55,7 @@ public class ByteArrayDataSource implements DataSource

/**
* The name associated with this data source.
* By default, the name is an empty string, similar to javax.mail.util.ByteArrayDataSource.
* By default, the name is an empty string, similar to jakarta.mail.util.ByteArrayDataSource.
* @since 1.3.1
*/
private String name = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package org.apache.commons.mail;

import javax.activation.DataSource;
import jakarta.activation.DataSource;
import java.io.IOException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package org.apache.commons.mail;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
import jakarta.mail.Authenticator;
import jakarta.mail.PasswordAuthentication;

/**
* This is a very simple authentication object that can be used for any
Expand Down
Loading