cancel
Showing results for 
Search instead for 
Did you mean: 

Send Email via SMTP On Premise Server in SAP CAP - Cloud Foundry

jinn
Explorer
0 Kudos

We need to send emails from Java application running on Cloud Foundry, while using a Destination of type Mail.

We used this tutorial for reference: https://help.sap.com/docs/connectivity/sap-btp-connectivity-neo/example-send-e-mails

However, when submitting the app to CF, we receive an error:

Caused by: java.lang.ClassNotFoundException: javax.mail.Authenticator

We tried adding the dependencies to .pom and as JARs, in different versions, using javax.mail and Jakarta lib - all in vain - the app does not start.

Can anyone please advise?

View Entire Topic
gregorw
Active Contributor
0 Kudos
jinn
Explorer
0 Kudos

I've seen it, thanks - however I cannot utilize it. The data there is read from Session that is received from OAuth2 data - and I don't have any authorization on my app, it's totally open, so I don't have anything like this.

Moreover, I don't see there anything about using a Mail Destination.

Am I missing something?

thank you