├── .git-blame-ignore-revs ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── maven.yml │ └── web.yml ├── .gitignore ├── CONTRIBUTING.md ├── Jenkinsfile ├── LICENSE.md ├── NOTICE.md ├── README.md ├── copyright-exclude ├── core ├── pom.xml └── src │ └── main │ ├── java │ ├── module-info.java │ └── org │ │ └── eclipse │ │ └── angus │ │ └── mail │ │ ├── auth │ │ ├── MD4.java │ │ ├── Ntlm.java │ │ ├── OAuth2SaslClient.java │ │ ├── OAuth2SaslClientFactory.java │ │ └── package-info.java │ │ ├── handlers │ │ ├── handler_base.java │ │ ├── image_gif.java │ │ ├── image_jpeg.java │ │ ├── message_rfc822.java │ │ ├── multipart_mixed.java │ │ ├── package-info.java │ │ ├── text_html.java │ │ ├── text_plain.java │ │ └── text_xml.java │ │ ├── nativeimage │ │ └── AngusMailFeature.java │ │ ├── package-info.java │ │ └── util │ │ ├── ASCIIUtility.java │ │ ├── BASE64DecoderStream.java │ │ ├── BASE64EncoderStream.java │ │ ├── BEncoderStream.java │ │ ├── CRLFOutputStream.java │ │ ├── DecodingException.java │ │ ├── DefaultProvider.java │ │ ├── LineInputStream.java │ │ ├── LineOutputStream.java │ │ ├── LogOutputStream.java │ │ ├── MailConnectException.java │ │ ├── MailLogger.java │ │ ├── MailSSLSocketFactory.java │ │ ├── MailStreamProvider.java │ │ ├── PropUtil.java │ │ ├── QDecoderStream.java │ │ ├── QEncoderStream.java │ │ ├── QPDecoderStream.java │ │ ├── QPEncoderStream.java │ │ ├── ReadableMime.java │ │ ├── SharedByteArrayOutputStream.java │ │ ├── SocketConnectException.java │ │ ├── SocketFetcher.java │ │ ├── TraceInputStream.java │ │ ├── TraceOutputStream.java │ │ ├── UUDecoderStream.java │ │ ├── UUEncoderStream.java │ │ ├── WriteTimeoutSocket.java │ │ └── package-info.java │ └── resources │ └── META-INF │ ├── javamail.charset.map │ ├── javamail.default.address.map │ ├── mailcap │ ├── native-image │ └── org.eclipse.angus │ │ └── angus-core │ │ ├── native-image.properties │ │ └── resource-config.json │ └── services │ └── jakarta.mail.util.StreamProvider ├── demos ├── client │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ ├── README.txt │ │ ├── example │ │ └── client │ │ │ ├── ComponentFrame.java │ │ │ ├── FolderModel.java │ │ │ ├── FolderTreeNode.java │ │ │ ├── FolderViewer.java │ │ │ ├── MessageViewer.java │ │ │ ├── MultipartViewer.java │ │ │ ├── SimpleAuthenticator.java │ │ │ ├── SimpleClient.java │ │ │ ├── StoreTreeNode.java │ │ │ └── TextViewer.java │ │ └── simple.mailcap ├── demo │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── README.txt │ │ │ ├── example │ │ │ └── app │ │ │ │ ├── CRLFOutputStream.java │ │ │ │ ├── NewlineOutputStream.java │ │ │ │ ├── copier.java │ │ │ │ ├── folderlist.java │ │ │ │ ├── internal │ │ │ │ ├── TtyAuthenticator.java │ │ │ │ ├── answer.java │ │ │ │ ├── foldersplit.java │ │ │ │ ├── fpopulate.java │ │ │ │ ├── msgsperweek.java │ │ │ │ └── testidle.java │ │ │ │ ├── monitor.java │ │ │ │ ├── mover.java │ │ │ │ ├── msgmultisendsample.java │ │ │ │ ├── msgsend.java │ │ │ │ ├── msgsendsample.java │ │ │ │ ├── msgshow.java │ │ │ │ ├── namespace.java │ │ │ │ ├── populate.java │ │ │ │ ├── registry.java │ │ │ │ ├── search.java │ │ │ │ ├── sendfile.java │ │ │ │ ├── sendhtml.java │ │ │ │ ├── smtpsend.java │ │ │ │ ├── transport.java │ │ │ │ └── uidmsgshow.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── example │ │ └── app │ │ └── ModulesTest.java ├── logging │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── README.txt │ │ │ ├── example │ │ │ └── app │ │ │ │ ├── FileErrorManager.java │ │ │ │ ├── MailHandlerDemo.java │ │ │ │ └── SummaryFormatter.java │ │ │ ├── maildemo.policy │ │ │ ├── maildemo.properties │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── example │ │ └── app │ │ └── ModulesTest.java ├── outlook │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ ├── README.txt │ │ └── example │ │ └── outlook │ │ ├── MSBodyPart.java │ │ ├── MSMessage.java │ │ └── MSMultipartDataSource.java ├── pom.xml ├── servlet │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── JakartaMail.html │ │ │ ├── README.txt │ │ │ ├── example │ │ │ └── app │ │ │ │ └── JakartaMailServlet.java │ │ │ └── module-info.java │ │ └── test │ │ └── java │ │ └── example │ │ └── app │ │ └── ModulesTest.java ├── taglib │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ ├── demo │ │ │ │ ├── AttachmentInfo.java │ │ │ │ ├── ListAttachmentsTEI.java │ │ │ │ ├── ListAttachmentsTag.java │ │ │ │ ├── ListMessagesTEI.java │ │ │ │ ├── ListMessagesTag.java │ │ │ │ ├── MessageInfo.java │ │ │ │ ├── MessageTEI.java │ │ │ │ ├── MessageTag.java │ │ │ │ └── SendTag.java │ │ │ └── module-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── taglib.tld │ │ └── test │ │ └── java │ │ └── demo │ │ └── ModulesTest.java └── webapp │ ├── build.bat │ ├── build.sh │ ├── pom.xml │ ├── src │ └── main │ │ ├── java │ │ └── demo │ │ │ ├── AttachmentServlet.java │ │ │ ├── FilterServlet.java │ │ │ └── MailUserBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── compose.jsp │ │ ├── errordetails.jsp │ │ ├── errorpage.jsp │ │ ├── folders.jsp │ │ ├── index.html │ │ ├── login.jsp │ │ ├── logout.jsp │ │ ├── messagecontent.jsp │ │ ├── messageheaders.jsp │ │ └── send.jsp │ └── webapp.README.txt ├── doc ├── CR-1.0.0-SUMMARY-6f02a9.TXT ├── pom.xml └── src │ └── main │ └── resources │ ├── README.md │ ├── TCK-Results.md │ └── docs │ ├── ApacheJServ.html │ ├── CHANGES.txt │ ├── COMPAT.txt │ ├── IssueMap.txt │ ├── JavaWebServer.html │ ├── NOTES.txt │ ├── NTLMNOTES.txt │ ├── README.txt │ ├── SSLNOTES.txt │ ├── Tomcat.html │ ├── classpath-NT.html │ ├── iPlanet.html │ └── images │ ├── direct-classpath.jpg │ └── indirect-classpath.jpg ├── docker ├── Dockerfile ├── JTReportParser │ ├── JTReportParser.jar │ └── lib │ │ ├── commons-lang3-3.5.jar │ │ └── jsoup-1.10.2.jar ├── build_jakartamail.sh └── run_jakartamailtck.sh ├── dsn ├── pom.xml └── src │ ├── main │ ├── java │ │ ├── module-info.java │ │ └── org │ │ │ └── eclipse │ │ │ └── angus │ │ │ └── mail │ │ │ └── dsn │ │ │ ├── DeliveryStatus.java │ │ │ ├── DispositionNotification.java │ │ │ ├── MessageHeaders.java │ │ │ ├── MultipartReport.java │ │ │ ├── Report.java │ │ │ ├── message_deliverystatus.java │ │ │ ├── message_dispositionnotification.java │ │ │ ├── multipart_report.java │ │ │ ├── package-info.java │ │ │ └── text_rfc822headers.java │ └── resources │ │ └── META-INF │ │ └── mailcap │ └── test │ └── java │ ├── example │ └── app │ │ ├── MultipartReportTest.java │ │ └── NullOutputStream.java │ └── module-info.java ├── mail.sig ├── mailhandler ├── pom.xml └── src │ └── main │ ├── java │ ├── module-info.java │ └── org │ │ └── eclipse │ │ └── angus │ │ └── mail │ │ └── util │ │ └── logging │ │ ├── CollectorFormatter.java │ │ ├── CompactFormatter.java │ │ ├── DurationFilter.java │ │ ├── LogManagerProperties.java │ │ ├── MailHandler.java │ │ ├── SeverityComparator.java │ │ └── package-info.java │ └── resources │ └── META-INF │ ├── hk2-locator │ └── default │ └── native-image │ └── org.eclipse.angus │ └── logging-mailhandler │ └── resource-config.json ├── pom.xml ├── providers ├── angus-mail │ ├── exclude.xml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── module-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── gfprobe-provider.xml │ │ │ ├── javamail.default.providers │ │ │ └── services │ │ │ └── jakarta.mail.Provider │ │ ├── oldtest │ │ └── java │ │ │ └── jakarta │ │ │ └── mail │ │ │ └── internet │ │ │ ├── decodetest │ │ │ ├── encodedheaders.data │ │ │ ├── messagecachetest.java │ │ │ └── socketfactory │ │ │ ├── DummySSLSocketFactory.java │ │ │ ├── DummySocketFactory.java │ │ │ ├── DummyTrustManager.java │ │ │ ├── TestResult.java │ │ │ └── socketfactorytest.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── eclipse │ │ │ └── angus │ │ │ └── mail │ │ │ ├── handlers │ │ │ └── TextXmlTest.java │ │ │ ├── iap │ │ │ ├── ProtocolTest.java │ │ │ ├── ResponseInputStreamTest.java │ │ │ └── ResponseTest.java │ │ │ ├── imap │ │ │ ├── IMAPAlertTest.java │ │ │ ├── IMAPAuthDebugTest.java │ │ │ ├── IMAPCloseFailureTest.java │ │ │ ├── IMAPConnectFailureTest.java │ │ │ ├── IMAPFetchProfileTest.java │ │ │ ├── IMAPFolderTest.java │ │ │ ├── IMAPHandler.java │ │ │ ├── IMAPIDTest.java │ │ │ ├── IMAPIdleManagerTest.java │ │ │ ├── IMAPIdleStateTest.java │ │ │ ├── IMAPIdleUntaggedResponseTest.java │ │ │ ├── IMAPLoginCapabilitiesTest.java │ │ │ ├── IMAPLoginFailureTest.java │ │ │ ├── IMAPLoginHandler.java │ │ │ ├── IMAPLoginReferralTest.java │ │ │ ├── IMAPMessageNumberOutOfRangeTest.java │ │ │ ├── IMAPMessageTest.java │ │ │ ├── IMAPPlainHandler.java │ │ │ ├── IMAPResponseEventTest.java │ │ │ ├── IMAPSaslHandler.java │ │ │ ├── IMAPSaslLoginTest.java │ │ │ ├── IMAPSearchTest.java │ │ │ ├── IMAPStoreTest.java │ │ │ ├── IMAPUidExpungeTest.java │ │ │ ├── MessageCacheTest.java │ │ │ └── protocol │ │ │ │ ├── BODYSTRUCTURETest.java │ │ │ │ ├── EnvelopeTest.java │ │ │ │ ├── IMAPProtocolTest.java │ │ │ │ ├── MODSEQTest.java │ │ │ │ ├── NamespacesTest.java │ │ │ │ ├── StatusTest.java │ │ │ │ ├── StratoImapBugfixTest.java │ │ │ │ └── UIDSetTest.java │ │ │ ├── pop3 │ │ │ ├── POP3AuthDebugTest.java │ │ │ ├── POP3FolderClosedExceptionTest.java │ │ │ ├── POP3Handler.java │ │ │ ├── POP3MessageTest.java │ │ │ ├── POP3ReadableMimeTest.java │ │ │ └── POP3StoreTest.java │ │ │ ├── smtp │ │ │ ├── NopServer.java │ │ │ ├── SMTPAuthDebugTest.java │ │ │ ├── SMTPBdatTest.java │ │ │ ├── SMTPCloseTest.java │ │ │ ├── SMTPConnectFailureTest.java │ │ │ ├── SMTPHandler.java │ │ │ ├── SMTPIOExceptionTest.java │ │ │ ├── SMTPLoginHandler.java │ │ │ ├── SMTPSaslHandler.java │ │ │ ├── SMTPSaslLoginTest.java │ │ │ ├── SMTPUknownCodeTest.java │ │ │ ├── SMTPUtf8Test.java │ │ │ └── SMTPWriteTimeoutTest.java │ │ │ ├── stream │ │ │ ├── LineInputStreamTest.java │ │ │ ├── LineInputStreamUtf8FailTest.java │ │ │ └── LineInputStreamUtf8Test.java │ │ │ ├── test │ │ │ ├── AsciiStringInputStream.java │ │ │ ├── NullOutputStream.java │ │ │ ├── ProtocolHandler.java │ │ │ ├── ReflectionUtil.java │ │ │ ├── SavedSocketFactory.java │ │ │ ├── SessionTest.java │ │ │ ├── TestSSLSocketFactory.java │ │ │ ├── TestServer.java │ │ │ └── TestSocketFactory.java │ │ │ └── util │ │ │ ├── AddAddressHeaderTest.java │ │ │ ├── AddFromTest.java │ │ │ ├── AllowEncodedMessagesTest.java │ │ │ ├── BASE64Test.java │ │ │ ├── ContentTypeCleanerTest.java │ │ │ ├── DecodeParametersTest.java │ │ │ ├── EncodeFileNameNoEncodeParametersTest.java │ │ │ ├── EncodeFileNameTest.java │ │ │ ├── GetLocalAddressTest.java │ │ │ ├── InternetHeadersTest.java │ │ │ ├── MimeBodyPartTest.java │ │ │ ├── MimeMessageTest.java │ │ │ ├── MimeMultipartBCSIndexTest.java │ │ │ ├── MimeMultipartParseTest.java │ │ │ ├── MimeMultipartPreambleTest.java │ │ │ ├── MimeMultipartPropertyTest.java │ │ │ ├── MimeUtilityTest.java │ │ │ ├── ModifyMessageTest.java │ │ │ ├── NoEncodeFileNameNoEncodeParametersTest.java │ │ │ ├── NoEncodeFileNameTest.java │ │ │ ├── NonAsciiBoundaryTest.java │ │ │ ├── ParameterListDecode.java │ │ │ ├── ParametersNoStrictTest.java │ │ │ ├── PropUtilTest.java │ │ │ ├── QPEncoderStreamTest.java │ │ │ ├── ReferencesTest.java │ │ │ ├── RestrictEncodingTest.java │ │ │ ├── SocketFetcherTest.java │ │ │ ├── TimeoutOutputStreamTest.java │ │ │ ├── UUDecoderStreamTest.java │ │ │ ├── Utf8AddressTest.java │ │ │ ├── WriteTimeoutSocketTest.java │ │ │ └── logging │ │ │ ├── AbstractLogging.java │ │ │ ├── CollectorFormatterTest.java │ │ │ ├── CompactFormatterTest.java │ │ │ ├── DurationFilterTest.java │ │ │ ├── LogManagerPropertiesTest.java │ │ │ ├── MailHandlerTest.java │ │ │ └── SeverityComparatorTest.java │ │ └── resources │ │ └── org │ │ └── eclipse │ │ └── angus │ │ └── mail │ │ ├── imap │ │ └── protocol │ │ │ └── uiddata │ │ ├── test │ │ └── keystore.jks │ │ └── util │ │ ├── paramdata │ │ ├── paramdatanostrict │ │ └── uudata ├── gimap │ ├── exclude.xml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ ├── module-info.java │ │ │ └── org │ │ │ │ └── eclipse │ │ │ │ └── angus │ │ │ │ └── mail │ │ │ │ └── gimap │ │ │ │ ├── GmailFolder.java │ │ │ │ ├── GmailMessage.java │ │ │ │ ├── GmailMsgIdTerm.java │ │ │ │ ├── GmailProvider.java │ │ │ │ ├── GmailRawSearchTerm.java │ │ │ │ ├── GmailSSLProvider.java │ │ │ │ ├── GmailSSLStore.java │ │ │ │ ├── GmailStore.java │ │ │ │ ├── GmailThrIdTerm.java │ │ │ │ ├── LongTerm.java │ │ │ │ ├── package-info.java │ │ │ │ └── protocol │ │ │ │ ├── GmailProtocol.java │ │ │ │ └── GmailSearchSequence.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── javamail.providers │ │ │ └── services │ │ │ └── jakarta.mail.Provider │ │ └── test │ │ └── java │ │ ├── example │ │ └── app │ │ │ └── ModulesTest.java │ │ └── module-info.java ├── imap │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ ├── module-info.java │ │ └── org │ │ │ └── eclipse │ │ │ └── angus │ │ │ └── mail │ │ │ ├── iap │ │ │ ├── Argument.java │ │ │ ├── BadCommandException.java │ │ │ ├── ByteArray.java │ │ │ ├── CommandFailedException.java │ │ │ ├── ConnectionException.java │ │ │ ├── Literal.java │ │ │ ├── LiteralException.java │ │ │ ├── ParsingException.java │ │ │ ├── Protocol.java │ │ │ ├── ProtocolException.java │ │ │ ├── Response.java │ │ │ ├── ResponseHandler.java │ │ │ ├── ResponseInputStream.java │ │ │ └── package-info.java │ │ │ └── imap │ │ │ ├── ACL.java │ │ │ ├── AppendUID.java │ │ │ ├── CopyUID.java │ │ │ ├── DefaultFolder.java │ │ │ ├── IMAPBodyPart.java │ │ │ ├── IMAPFolder.java │ │ │ ├── IMAPInputStream.java │ │ │ ├── IMAPMessage.java │ │ │ ├── IMAPMultipartDataSource.java │ │ │ ├── IMAPNestedMessage.java │ │ │ ├── IMAPProvider.java │ │ │ ├── IMAPSSLProvider.java │ │ │ ├── IMAPSSLStore.java │ │ │ ├── IMAPStore.java │ │ │ ├── IdleManager.java │ │ │ ├── MessageCache.java │ │ │ ├── MessageVanishedEvent.java │ │ │ ├── ModifiedSinceTerm.java │ │ │ ├── OlderTerm.java │ │ │ ├── ReferralException.java │ │ │ ├── ResyncData.java │ │ │ ├── Rights.java │ │ │ ├── SortTerm.java │ │ │ ├── Utility.java │ │ │ ├── YoungerTerm.java │ │ │ ├── package-info.java │ │ │ └── protocol │ │ │ ├── BASE64MailboxDecoder.java │ │ │ ├── BASE64MailboxEncoder.java │ │ │ ├── BODY.java │ │ │ ├── BODYSTRUCTURE.java │ │ │ ├── ENVELOPE.java │ │ │ ├── FLAGS.java │ │ │ ├── FetchItem.java │ │ │ ├── FetchResponse.java │ │ │ ├── ID.java │ │ │ ├── IMAPProtocol.java │ │ │ ├── IMAPReferralException.java │ │ │ ├── IMAPResponse.java │ │ │ ├── IMAPSaslAuthenticator.java │ │ │ ├── INTERNALDATE.java │ │ │ ├── Item.java │ │ │ ├── ListInfo.java │ │ │ ├── MODSEQ.java │ │ │ ├── MailboxInfo.java │ │ │ ├── MessageSet.java │ │ │ ├── Namespaces.java │ │ │ ├── RFC822DATA.java │ │ │ ├── RFC822SIZE.java │ │ │ ├── SaslAuthenticator.java │ │ │ ├── SearchSequence.java │ │ │ ├── Status.java │ │ │ ├── UID.java │ │ │ ├── UIDSet.java │ │ │ └── package-info.java │ │ └── resources │ │ └── META-INF │ │ ├── javamail.providers │ │ └── services │ │ └── jakarta.mail.Provider ├── jakarta.mail │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── module-info.java │ │ └── javadoc │ │ └── doc-files │ │ └── speclicense.html ├── mbox │ ├── exclude.xml │ ├── native │ │ └── pom.xml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── cpp │ │ │ └── org │ │ │ │ └── eclipse │ │ │ │ └── angus │ │ │ │ └── mail │ │ │ │ └── mbox │ │ │ │ ├── UNIXFile.c │ │ │ │ └── UNIXInbox.c │ │ ├── java │ │ │ ├── module-info.java │ │ │ └── org │ │ │ │ └── eclipse │ │ │ │ └── angus │ │ │ │ └── mail │ │ │ │ ├── mbox │ │ │ │ ├── ContentLengthCounter.java │ │ │ │ ├── ContentLengthUpdater.java │ │ │ │ ├── DefaultMailbox.java │ │ │ │ ├── FileInterface.java │ │ │ │ ├── InboxFile.java │ │ │ │ ├── LineCounter.java │ │ │ │ ├── MailFile.java │ │ │ │ ├── Mailbox.java │ │ │ │ ├── MboxFolder.java │ │ │ │ ├── MboxMessage.java │ │ │ │ ├── MboxProvider.java │ │ │ │ ├── MboxStore.java │ │ │ │ ├── MessageLoader.java │ │ │ │ ├── NewlineOutputStream.java │ │ │ │ ├── SolarisMailbox.java │ │ │ │ ├── SunOSMailbox.java │ │ │ │ ├── SunV3BodyPart.java │ │ │ │ ├── SunV3Multipart.java │ │ │ │ ├── TempFile.java │ │ │ │ ├── UNIXFile.java │ │ │ │ ├── UNIXFolder.java │ │ │ │ └── UNIXInbox.java │ │ │ │ └── remote │ │ │ │ ├── POP3RemoteProvider.java │ │ │ │ ├── POP3RemoteStore.java │ │ │ │ ├── RemoteDefaultFolder.java │ │ │ │ ├── RemoteInbox.java │ │ │ │ └── RemoteStore.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── javamail.providers │ │ │ └── services │ │ │ └── jakarta.mail.Provider │ │ └── test │ │ └── java │ │ └── org │ │ └── eclipse │ │ └── angus │ │ └── mail │ │ └── mbox │ │ ├── MboxFolderExpungeTest.java │ │ └── MboxFolderTest.java ├── pom.xml ├── pop3 │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ ├── module-info.java │ │ └── org │ │ │ └── eclipse │ │ │ └── angus │ │ │ └── mail │ │ │ └── pop3 │ │ │ ├── AppendStream.java │ │ │ ├── DefaultFolder.java │ │ │ ├── POP3Folder.java │ │ │ ├── POP3Message.java │ │ │ ├── POP3Provider.java │ │ │ ├── POP3SSLProvider.java │ │ │ ├── POP3SSLStore.java │ │ │ ├── POP3Store.java │ │ │ ├── Protocol.java │ │ │ ├── Status.java │ │ │ ├── TempFile.java │ │ │ ├── WritableSharedFile.java │ │ │ └── package-info.java │ │ └── resources │ │ └── META-INF │ │ ├── javamail.providers │ │ └── services │ │ └── jakarta.mail.Provider └── smtp │ ├── pom.xml │ └── src │ └── main │ ├── java │ ├── module-info.java │ └── org │ │ └── eclipse │ │ └── angus │ │ └── mail │ │ └── smtp │ │ ├── DigestMD5.java │ │ ├── SMTPAddressFailedException.java │ │ ├── SMTPAddressSucceededException.java │ │ ├── SMTPMessage.java │ │ ├── SMTPOutputStream.java │ │ ├── SMTPProvider.java │ │ ├── SMTPSSLProvider.java │ │ ├── SMTPSSLTransport.java │ │ ├── SMTPSaslAuthenticator.java │ │ ├── SMTPSendFailedException.java │ │ ├── SMTPSenderFailedException.java │ │ ├── SMTPTransport.java │ │ ├── SaslAuthenticator.java │ │ └── package-info.java │ └── resources │ └── META-INF │ ├── javamail.address.map │ ├── javamail.providers │ └── services │ └── jakarta.mail.Provider ├── siggen ├── sigtest ├── src └── main │ └── assembly │ └── resources.xml ├── update_version └── www ├── Android.md ├── AngusMail-License.md ├── Books.md ├── Build-Instructions.md ├── Contributions.md ├── Exchange.md ├── FAQ.html ├── Gemfile ├── Gemfile.lock ├── Gmail.md ├── Google-App-Engine.md ├── IMAP-Store.md ├── InstallCert.java ├── InstallCert.md ├── Links.md ├── Mbox-Provider.md ├── Mbox-Store.md ├── OAuth2.md ├── Outlook.md ├── POP3-Remote-Store.md ├── POP3-Store.md ├── SMTP-Transport.md ├── ThirdPartyProducts.md ├── Windows.md ├── Workspace-Structure.md ├── Yahoo.md ├── _config.yml ├── _includes ├── header-small.html └── sidebar.html └── _layouts └── content.html /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | #fix code formatting through the repo 2 | 216c5f802cb6002ce9f0c8f227c70b27bc2817b7 3 | 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | **Expected behavior** 22 | A clear and concise description of what you expected to happen. 23 | 24 | **Screenshots** 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Desktop (please complete the following information):** 28 | 29 | - OS: [e.g. iOS] 30 | - Browser [e.g. chrome, safari] 31 | - Version [e.g. 22] 32 | 33 | **Smartphone (please complete the following information):** 34 | 35 | - Device: [e.g. iPhone6] 36 | - OS: [e.g. iOS8.1] 37 | - Browser [e.g. stock browser, safari] 38 | - Version [e.g. 22] 39 | 40 | **Mail server:** 41 | 42 | - Protocol being used: [e.g. smtp, imap, pop3, etc.] 43 | - Vendor/product: [e.g. Microsoft Exchange] 44 | - Mail service URL: [e.g. gmail.com] 45 | 46 | **Additional context** 47 | Add any other context about the problem here. 48 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation 3 | # 4 | # This program and the accompanying materials are made available under the 5 | # terms of the Eclipse Public License v. 2.0 which is available at 6 | # http://www.eclipse.org/legal/epl-2.0, 7 | # or the Eclipse Distribution License v. 1.0 which is available at 8 | # http://www.eclipse.org/org/documents/edl-v10.php. 9 | # 10 | # SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause 11 | # 12 | 13 | name: Angus Mail 14 | 15 | on: 16 | pull_request: 17 | paths-ignore: 18 | - 'doc/**' 19 | - 'www/**' 20 | push: 21 | paths-ignore: 22 | - 'doc/**' 23 | - 'www/**' 24 | 25 | jobs: 26 | build: 27 | name: Test on JDK ${{ matrix.java_version }} 28 | runs-on: ubuntu-latest 29 | 30 | strategy: 31 | matrix: 32 | java_version: [ 8, 17, 21 ] 33 | 34 | steps: 35 | - name: Checkout for build 36 | uses: actions/checkout@v4 37 | - name: Set up JDK 38 | uses: actions/setup-java@v4 39 | with: 40 | distribution: 'zulu' 41 | java-version: ${{ matrix.java_version }} 42 | cache: maven 43 | - name: Verify 44 | run: mvn -B -U -C -V clean verify org.glassfish.copyright:glassfish-copyright-maven-plugin:check -Poss-release,staging,build-only -Dgpg.skip=true -Dcopyright.ignoreyear=true -Denforcer.skip 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | target/ 3 | nbproject/private/ 4 | webrev 5 | mbox/.ccls-cache/ 6 | /bin/ 7 | .classpath 8 | .project 9 | .settings/ 10 | 11 | _site 12 | www/.sass-cache 13 | www/.jekyll-cache 14 | www/.jekyll-metadata 15 | www/vendor 16 | www/docs 17 | www/CONTRIBUTING.md 18 | www/README.md 19 | www/TCK-Results.md 20 | *.iml 21 | -------------------------------------------------------------------------------- /NOTICE.md: -------------------------------------------------------------------------------- 1 | # Notices for Jakarta Mail 2 | 3 | This content is produced and maintained by the Jakarta Mail project. 4 | 5 | * Project home: https://projects.eclipse.org/projects/ee4j.mail 6 | 7 | ## Trademarks 8 | 9 | Jakarta Mail is a trademark of the Eclipse Foundation. 10 | 11 | ## Copyright 12 | 13 | All content is the property of the respective authors or their employers. For 14 | more information regarding authorship of content, please consult the listed 15 | source code repository logs. 16 | 17 | ## Declared Project Licenses 18 | 19 | This program and the accompanying materials are made available under the terms 20 | of the Eclipse Public License v. 2.0 which is available at 21 | http://www.eclipse.org/legal/epl-2.0. This Source Code may also be made 22 | available under the following Secondary Licenses when the conditions for such 23 | availability set forth in the Eclipse Public License v. 2.0 are satisfied: GNU 24 | General Public License, version 2 with the GNU Classpath Exception which is 25 | available at https://www.gnu.org/software/classpath/license.html. 26 | 27 | SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 28 | 29 | ## Source Code 30 | 31 | The project maintains the following source code repositories: 32 | 33 | * https://github.com/eclipse-ee4j/mail 34 | 35 | ## Third-party Content 36 | 37 | This project leverages the following third party content. 38 | 39 | None 40 | 41 | ## Cryptography 42 | 43 | Content may contain encryption software. The country in which you are currently 44 | may have restrictions on the import, possession, and use, and/or re-export to 45 | another country, of encryption software. BEFORE using any encryption software, 46 | please check the country's laws, regulations and policies concerning the import, 47 | possession, or use, and re-export of encryption software, to see if this is 48 | permitted. 49 | 50 | -------------------------------------------------------------------------------- /copyright-exclude: -------------------------------------------------------------------------------- 1 | copyright-exclude 2 | /MANIFEST.MF 3 | /META-INF/services/ 4 | /META-INF/javamail 5 | /META-INF/mailcap 6 | /README 7 | /NOTICE 8 | /Jenkinsfile 9 | doc/release/ 10 | doc/spec/ 11 | /LICENSE.txt 12 | CONTRIBUTING.md 13 | LICENSE.md 14 | client/src/main/java/simple.mailcap 15 | mail/src/oldtest/java/jakarta/mail/internet/encodedheaders.data 16 | mail.sig 17 | webapp/build.bat 18 | webapp/webapp.README.txt 19 | logging/src/main/java/ 20 | mail/src/test/resources/jakarta/mail/internet/paramdata 21 | mail/src/test/resources/jakarta/mail/internet/paramdatanostrict 22 | mail/src/test/resources/jakarta/mail/internet/tokenlist 23 | mail/src/test/resources/jakarta/mail/internet/addrlist 24 | mail/src/test/resources/jakarta/mail/internet/MailDateFormat_old.ser 25 | mail/src/test/resources/jakarta/mail/internet/MailDateFormat_new.ser 26 | mail/src/test/resources/org/eclipse/angus/mail/test/keystore.jks 27 | mail/src/main/java/doc-files/speclicense.html 28 | mailhandler/src/main/resources/META-INF/hk2-locator/default 29 | docker/JTReportParser/ 30 | providers/angus-mail/src/test/resources/org/eclipse/angus/mail/util/paramdatanostrict 31 | providers/angus-mail/src/test/resources/org/eclipse/angus/mail/util/paramdata 32 | .txt 33 | .TXT 34 | www/ 35 | .json 36 | .jpg 37 | .md 38 | -------------------------------------------------------------------------------- /core/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | module org.eclipse.angus.mail { 18 | 19 | requires transitive java.logging; 20 | requires java.xml; // for text/xml handler 21 | requires java.desktop; // for image/jpeg handler 22 | requires static java.security.sasl; // for OAuth2 support 23 | requires transitive jakarta.mail; 24 | requires transitive jakarta.activation; 25 | 26 | requires static org.graalvm.sdk; // for graal integration 27 | 28 | exports org.eclipse.angus.mail.auth; 29 | exports org.eclipse.angus.mail.handlers; 30 | exports org.eclipse.angus.mail.util; 31 | 32 | uses jakarta.mail.Provider; 33 | 34 | provides jakarta.mail.util.StreamProvider with 35 | org.eclipse.angus.mail.util.MailStreamProvider; 36 | } 37 | -------------------------------------------------------------------------------- /core/src/main/java/org/eclipse/angus/mail/auth/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | /** 18 | * This package includes internal authentication support classes and 19 | * SHOULD NOT BE USED DIRECTLY BY APPLICATIONS. 20 | */ 21 | package org.eclipse.angus.mail.auth; 22 | -------------------------------------------------------------------------------- /core/src/main/java/org/eclipse/angus/mail/handlers/image_jpeg.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package org.eclipse.angus.mail.handlers; 18 | 19 | import jakarta.activation.ActivationDataFlavor; 20 | 21 | import java.awt.*; 22 | 23 | /** 24 | * DataContentHandler for image/jpeg. 25 | */ 26 | public class image_jpeg extends image_gif { 27 | private static ActivationDataFlavor[] myDF = { 28 | new ActivationDataFlavor(Image.class, "image/jpeg", "JPEG Image") 29 | }; 30 | 31 | /** 32 | * Creates a default {@code image_jpeg}. 33 | */ 34 | public image_jpeg() { 35 | } 36 | 37 | @Override 38 | protected ActivationDataFlavor[] getDataFlavors() { 39 | return myDF; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /core/src/main/java/org/eclipse/angus/mail/handlers/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | /** 18 | * This package includes internal data handler support classes and 19 | * SHOULD NOT BE USED DIRECTLY BY APPLICATIONS. 20 | */ 21 | package org.eclipse.angus.mail.handlers; 22 | -------------------------------------------------------------------------------- /core/src/main/java/org/eclipse/angus/mail/handlers/text_html.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package org.eclipse.angus.mail.handlers; 18 | 19 | import jakarta.activation.ActivationDataFlavor; 20 | 21 | /** 22 | * DataContentHandler for text/html. 23 | */ 24 | public class text_html extends text_plain { 25 | private static ActivationDataFlavor[] myDF = { 26 | new ActivationDataFlavor(String.class, "text/html", "HTML String") 27 | }; 28 | 29 | /** 30 | * Creates a default {@code text_html}. 31 | */ 32 | public text_html() { 33 | } 34 | 35 | @Override 36 | protected ActivationDataFlavor[] getDataFlavors() { 37 | return myDF; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /core/src/main/java/org/eclipse/angus/mail/util/BEncoderStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package org.eclipse.angus.mail.util; 18 | 19 | import java.io.OutputStream; 20 | 21 | /** 22 | * This class implements a 'B' Encoder as defined by RFC2047 for 23 | * encoding MIME headers. It subclasses the BASE64EncoderStream 24 | * class. 25 | * 26 | * @author John Mani 27 | */ 28 | 29 | public class BEncoderStream extends BASE64EncoderStream { 30 | 31 | /** 32 | * Create a 'B' encoder that encodes the specified input stream. 33 | * 34 | * @param out the output stream 35 | */ 36 | public BEncoderStream(OutputStream out) { 37 | super(out, Integer.MAX_VALUE); // MAX_VALUE is 2^31, should 38 | // suffice (!) to indicate that 39 | // CRLFs should not be inserted 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /core/src/main/java/org/eclipse/angus/mail/util/DecodingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package org.eclipse.angus.mail.util; 18 | 19 | import java.io.IOException; 20 | 21 | /** 22 | * A special IOException that indicates a failure to decode data due 23 | * to an error in the formatting of the data. This allows applications 24 | * to distinguish decoding errors from other I/O errors. 25 | * 26 | * @author Bill Shannon 27 | */ 28 | 29 | public class DecodingException extends IOException { 30 | 31 | private static final long serialVersionUID = -6913647794421459390L; 32 | 33 | /** 34 | * Constructor. 35 | * 36 | * @param s the exception message 37 | */ 38 | public DecodingException(String s) { 39 | super(s); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /core/src/main/java/org/eclipse/angus/mail/util/DefaultProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package org.eclipse.angus.mail.util; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to mark the default providers that are part of Jakarta Mail. 26 | * DO NOT use this on any provider made available independently. 27 | * 28 | * @author Bill Shannon 29 | * @since Jakarta Mail 1.6.4 30 | */ 31 | @Retention(RetentionPolicy.RUNTIME) 32 | @Target(ElementType.TYPE) 33 | public @interface DefaultProvider { 34 | } 35 | -------------------------------------------------------------------------------- /core/src/main/java/org/eclipse/angus/mail/util/ReadableMime.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package org.eclipse.angus.mail.util; 18 | 19 | import jakarta.mail.MessagingException; 20 | 21 | import java.io.InputStream; 22 | 23 | /** 24 | * A Message or message Part whose data can be read as a MIME format 25 | * stream. Note that the MIME stream will include both the headers 26 | * and the body of the message or part. This should be the same data 27 | * that is produced by the writeTo method, but in a readable form. 28 | * 29 | * @author Bill Shannon 30 | * @since JavaMail 1.4.5 31 | */ 32 | public interface ReadableMime { 33 | /** 34 | * Return the MIME format stream corresponding to this message part. 35 | * 36 | * @return the MIME format stream 37 | * @exception MessagingException for failures 38 | */ 39 | public InputStream getMimeStream() throws MessagingException; 40 | } 41 | -------------------------------------------------------------------------------- /core/src/main/java/org/eclipse/angus/mail/util/SharedByteArrayOutputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package org.eclipse.angus.mail.util; 18 | 19 | import jakarta.mail.util.SharedByteArrayInputStream; 20 | 21 | import java.io.ByteArrayOutputStream; 22 | import java.io.InputStream; 23 | 24 | /** 25 | * A ByteArrayOutputStream that allows us to share the byte array 26 | * rather than copy it. Eventually could replace this with something 27 | * that doesn't require a single contiguous byte array. 28 | * 29 | * @author Bill Shannon 30 | * @since JavaMail 1.4.5 31 | */ 32 | public class SharedByteArrayOutputStream extends ByteArrayOutputStream { 33 | public SharedByteArrayOutputStream(int size) { 34 | super(size); 35 | } 36 | 37 | public InputStream toStream() { 38 | return new SharedByteArrayInputStream(buf, 0, count); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /core/src/main/java/org/eclipse/angus/mail/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | /** 18 | * Utility classes for use with the Jakarta Mail API. 19 | * These utility classes are not part of the Jakarta Mail specification. 20 | * While this package contains many classes used by the Jakarta Mail implementation 21 | * and not intended for direct use by applications, the classes documented 22 | * here may be of use to applications. 23 | * 24 | *
25 | * Classes in this package log debugging information using 26 | * {@link java.util.logging} as described in the following table: 27 | *
28 | *Logger Name | 32 | *Logging Level | 33 | *Purpose | 34 | *
---|---|---|
org.eclipse.angus.mail.util.socket | 38 | *FINER | 39 | *Debugging output related to creating sockets | 40 | *
44 | * WARNING: The APIs in this package should be
45 | * considered EXPERIMENTAL. They may be changed in the
46 | * future in ways that are incompatible with applications using the
47 | * current APIs.
48 | */
49 | package org.eclipse.angus.mail.util;
50 |
--------------------------------------------------------------------------------
/core/src/main/resources/META-INF/javamail.charset.map:
--------------------------------------------------------------------------------
1 | ### JDK-to-MIME charset mapping table ####
2 | ### This should be the first mapping table ###
3 |
4 | 8859_1 ISO-8859-1
5 | iso8859_1 ISO-8859-1
6 | ISO8859-1 ISO-8859-1
7 |
8 | 8859_2 ISO-8859-2
9 | iso8859_2 ISO-8859-2
10 | ISO8859-2 ISO-8859-2
11 |
12 | 8859_3 ISO-8859-3
13 | iso8859_3 ISO-8859-3
14 | ISO8859-3 ISO-8859-3
15 |
16 | 8859_4 ISO-8859-4
17 | iso8859_4 ISO-8859-4
18 | ISO8859-4 ISO-8859-4
19 |
20 | 8859_5 ISO-8859-5
21 | iso8859_5 ISO-8859-5
22 | ISO8859-5 ISO-8859-5
23 |
24 | 8859_6 ISO-8859-6
25 | iso8859_6 ISO-8859-6
26 | ISO8859-6 ISO-8859-6
27 |
28 | 8859_7 ISO-8859-7
29 | iso8859_7 ISO-8859-7
30 | ISO8859-7 ISO-8859-7
31 |
32 | 8859_8 ISO-8859-8
33 | iso8859_8 ISO-8859-8
34 | ISO8859-8 ISO-8859-8
35 |
36 | 8859_9 ISO-8859-9
37 | iso8859_9 ISO-8859-9
38 | ISO8859-9 ISO-8859-9
39 |
40 | SJIS Shift_JIS
41 | JIS ISO-2022-JP
42 | ISO2022JP ISO-2022-JP
43 | EUC_JP euc-jp
44 | KOI8_R koi8-r
45 | EUC_CN euc-cn
46 | EUC_TW euc-tw
47 | EUC_KR euc-kr
48 |
49 | --DIVIDER: this line *must* start with "--" and end with "--" --
50 |
51 | #### XXX-to-JDK charset mapping table ####
52 |
53 | iso-2022-cn ISO2022CN
54 | iso-2022-kr ISO2022KR
55 | utf-8 UTF8
56 | utf8 UTF8
57 | en_US.iso885915 ISO-8859-15
58 | ja_jp.iso2022-7 ISO2022JP
59 | ja_jp.eucjp EUCJIS
60 |
61 | # these two are not needed in 1.1.6. (since EUC_KR exists
62 | # and KSC5601 will map to the correct converter)
63 | euc-kr KSC5601
64 | euckr KSC5601
65 |
66 | # in JDK 1.1.6 we will no longer need the "us-ascii" convert
67 | us-ascii ISO-8859-1
68 | x-us-ascii ISO-8859-1
69 |
70 | # Chinese charsets are a mess and widely misrepresented.
71 | # gb18030 is a superset of gbk, which is a supserset of cp936/ms936,
72 | # which is a superset of gb2312.
73 | # https://bugzilla.gnome.org/show_bug.cgi?id=446783
74 | # map all of these to gb18030.
75 | gb2312 GB18030
76 | cp936 GB18030
77 | ms936 GB18030
78 | gbk GB18030
79 |
--------------------------------------------------------------------------------
/core/src/main/resources/META-INF/javamail.default.address.map:
--------------------------------------------------------------------------------
1 | rfc822=smtp
2 |
--------------------------------------------------------------------------------
/core/src/main/resources/META-INF/mailcap:
--------------------------------------------------------------------------------
1 | #
2 | #
3 | # Default mailcap file for the Jakarta Mail System.
4 | #
5 | # Jakarta Mail content-handlers:
6 | #
7 | text/plain;; x-java-content-handler=org.eclipse.angus.mail.handlers.text_plain
8 | text/html;; x-java-content-handler=org.eclipse.angus.mail.handlers.text_html
9 | text/xml;; x-java-content-handler=org.eclipse.angus.mail.handlers.text_xml
10 | multipart/*;; x-java-content-handler=org.eclipse.angus.mail.handlers.multipart_mixed; x-java-fallback-entry=true
11 | message/rfc822;; x-java-content-handler=org.eclipse.angus.mail.handlers.message_rfc822
12 | #
13 | # can't support image types because java.awt.Toolkit doesn't work on servers
14 | #
15 | #image/gif;; x-java-content-handler=org.eclipse.angus.mail.handlers.image_gif
16 | #image/jpeg;; x-java-content-handler=org.eclipse.angus.mail.handlers.image_jpeg
17 |
--------------------------------------------------------------------------------
/core/src/main/resources/META-INF/native-image/org.eclipse.angus/angus-core/native-image.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
3 | #
4 | # This program and the accompanying materials are made available under the
5 | # terms of the Eclipse Distribution License v. 1.0, which is available at
6 | # http://www.eclipse.org/org/documents/edl-v10.php.
7 | #
8 | # SPDX-License-Identifier: BSD-3-Clause
9 | Args=--features=org.eclipse.angus.mail.nativeimage.AngusMailFeature
10 |
--------------------------------------------------------------------------------
/core/src/main/resources/META-INF/native-image/org.eclipse.angus/angus-core/resource-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "resources": {
3 | "includes": [
4 | {
5 | "pattern": "\\QMETA-INF/gfprobe-provider.xml\\E"
6 | },
7 | {
8 | "pattern": "\\QMETA-INF/javamail.charset.map\\E"
9 | },
10 | {
11 | "pattern": "\\QMETA-INF/javamail.address.map\\E"
12 | },
13 | {
14 | "pattern": "\\QMETA-INF/javamail.default.address.map\\E"
15 | },
16 | {
17 | "pattern": "\\QMETA-INF/javamail.default.providers\\E"
18 | },
19 | {
20 | "pattern": "\\QMETA-INF/javamail.providers\\E"
21 | }
22 | ]
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/core/src/main/resources/META-INF/services/jakarta.mail.util.StreamProvider:
--------------------------------------------------------------------------------
1 | org.eclipse.angus.mail.util.MailStreamProvider
--------------------------------------------------------------------------------
/demos/client/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 | *
22 | * This stream can be used with the Message.writeTo method to
23 | * generate a message that uses the local plaform's line terminator
24 | * for the purpose of (e.g.) saving the message to a local file.
25 | */
26 | public class NewlineOutputStream extends FilterOutputStream {
27 | private int lastb = -1;
28 | private static byte[] newline;
29 |
30 | public NewlineOutputStream(OutputStream os) {
31 | super(os);
32 | if (newline == null) {
33 | String s = System.lineSeparator();
34 | if (s == null || s.length() <= 0)
35 | s = "\n";
36 | newline = s.getBytes(StandardCharsets.ISO_8859_1); // really us-ascii
37 | }
38 | }
39 |
40 | public void write(int b) throws IOException {
41 | if (b == '\r') {
42 | out.write(newline);
43 | } else if (b == '\n') {
44 | if (lastb != '\r')
45 | out.write(newline);
46 | } else {
47 | out.write(b);
48 | }
49 | lastb = b;
50 | }
51 |
52 | public void write(byte[] b) throws IOException {
53 | write(b, 0, b.length);
54 | }
55 |
56 | public void write(byte[] b, int off, int len) throws IOException {
57 | for (int i = 0; i < len; i++) {
58 | write(b[off + i]);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/demos/demo/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v. 2.0, which is available at
6 | * http://www.eclipse.org/legal/epl-2.0.
7 | *
8 | * This Source Code may also be made available under the following Secondary
9 | * Licenses when the conditions for such availability set forth in the
10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
11 | * version 2 with the GNU Classpath Exception, which is available at
12 | * https://www.gnu.org/software/classpath/license.html.
13 | *
14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15 | */
16 |
17 | module example.app {
18 | requires org.eclipse.angus.mail;
19 | }
--------------------------------------------------------------------------------
/demos/demo/src/test/java/example/app/ModulesTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v. 2.0, which is available at
6 | * http://www.eclipse.org/legal/epl-2.0.
7 | *
8 | * This Source Code may also be made available under the following Secondary
9 | * Licenses when the conditions for such availability set forth in the
10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
11 | * version 2 with the GNU Classpath Exception, which is available at
12 | * https://www.gnu.org/software/classpath/license.html.
13 | *
14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15 | */
16 |
17 | package example.app;
18 |
19 | import jakarta.mail.NoSuchProviderException;
20 | import jakarta.mail.Session;
21 | import jakarta.mail.util.StreamProvider;
22 | import org.eclipse.angus.mail.util.MailStreamProvider;
23 | import org.junit.Test;
24 |
25 | import java.util.Properties;
26 |
27 | import static org.junit.Assert.assertEquals;
28 |
29 | public class ModulesTest {
30 |
31 | // With org.eclipse.angus:angus-mail
32 | @Test
33 | public void test() throws NoSuchProviderException, ClassNotFoundException {
34 | Session session = Session.getDefaultInstance(new Properties());
35 | StreamProvider provider = session.getStreamProvider();
36 | assertEquals(MailStreamProvider.class, provider.getClass());
37 | Class.forName("org.eclipse.angus.mail.imap.IMAPProvider");
38 | Class.forName("org.eclipse.angus.mail.pop3.POP3Provider");
39 | Class.forName("org.eclipse.angus.mail.smtp.SMTPProvider");
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/demos/logging/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |