-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #342 from mikesname/feature/commons-email2
Switch over dependencies to commons-email2 / Jakarta (WIP)
- Loading branch information
Showing
11 changed files
with
27 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
play-mailer/src/main/scala/play/api/libs/mailer/Attachment.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
play-mailer/src/main/scala/play/api/libs/mailer/SMTPMailer.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package play.api.libs.mailer | ||
|
||
import java.io.File | ||
import javax.mail.Part | ||
|
||
import com.typesafe.config.{ Config, ConfigFactory } | ||
import org.apache.commons.mail.{ EmailConstants, HtmlEmail, MultiPartEmail } | ||
import jakarta.mail.Part | ||
import org.apache.commons.mail2.core.EmailConstants | ||
import org.apache.commons.mail2.jakarta.{ HtmlEmail, MultiPartEmail } | ||
import org.specs2.mutable._ | ||
|
||
import java.io.File | ||
|
||
class MailerPluginSpec extends Specification { | ||
|
||
object SimpleMailerClient extends MailerClient { | ||
|
@@ -18,8 +19,6 @@ class MailerPluginSpec extends Specification { | |
override def getContainer = super.getContainer | ||
} | ||
class MockHtmlEmail extends HtmlEmail { | ||
def getHtml = this.html | ||
def getText = this.text | ||
override def getPrimaryBodyPart = super.getPrimaryBodyPart | ||
override def getContainer = super.getContainer | ||
} | ||
|
@@ -67,8 +66,8 @@ class MailerPluginSpec extends Specification { | |
subject = "Subject", | ||
from = "John Doe <[email protected]>" | ||
)) | ||
email.getSocketTimeout mustEqual EmailConstants.SOCKET_TIMEOUT_MS | ||
email.getSocketConnectionTimeout mustEqual EmailConstants.SOCKET_TIMEOUT_MS | ||
email.getSocketTimeout mustEqual EmailConstants.SOCKET_TIMEOUT.toMillis.toInt | ||
email.getSocketConnectionTimeout mustEqual EmailConstants.SOCKET_TIMEOUT.toMillis.toInt | ||
} | ||
|
||
"configure the SMTP local host if configured" in { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters