[ 
https://issues.apache.org/jira/browse/GERONIMO-6884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035820#comment-18035820
 ] 

Jens Heitmann commented on GERONIMO-6884:
-----------------------------------------

I've made some further testing.

Problem is still there with the current master.

It seems to be a problem with interfering with the jakarta.mail library in 
WEB-INF/lib. It seems to generate correctly without it. But I am not sure, if 
it is working finally, because I am not able to send it out to smtp with port 
465 or 587.

it fails with an instantiation exception on "javax.net.ssl.SSLSocketFactory" 
with Java 17 in MailConnection. Port 465 and 587 is working in Angus-mail 
without any problem.

Maybe getting this to work fixes the other one. Problem is that jakarta.mail is 
added by mvn to WEB-INF/lib because it is a dependency for commons-mail. May be 
this is a commons-mail problem to remove the dependency because jakarta.mail 
should be part of the servers.

> Jakarta mail behaves different from eclipse.angus
> -------------------------------------------------
>
>                 Key: GERONIMO-6884
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6884
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>    Affects Versions: Mail_2.1_1.0.1
>         Environment: Apache Tomee 10.1.2 Plume
>  
>            Reporter: Jens Heitmann
>            Priority: Major
>         Attachments: example-mail.zip
>
>
> As mentioned in TOMEE-4547 Jakarta mail behaves differently from Javax and 
> Angus implementation.
> I've attached a quick-and-dirty example project. (Adapt Config.java before 
> testing in your environment). Try it in following modifications
> 1. use the mailtest as it is with Jakarta.mail inside WEB-INF/lib
>  - Simple mail works directly or via commons mail
>  - Multipart mail is send with empty body
> 2. remove Jakarta.mail from WEB-INF/lib
>  - Sending any mail fails via 465
> 3. Replace Geronimo-mail in tomee/lib folder with angus-core, angus-mail and 
> jakarta-mail
>  - Everything works fine
> Mail is an essential part for web applications, sending invoices, password 
> recovery etc. It would be nice if this is working out of the box in Geronimo 
> too, to omit patching a tomee environment. It is dangerous in update 
> situations, because it may be forgotten or it may have side effects.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to