Skip to Content
0
Aug 24, 2023 at 12:15 PM

Send mails using On-premise mail server SAP CLOUD SDK JAVA

4816 Views Last edit Aug 24, 2023 at 12:16 PM 2 rev

Hello,

I'm trying to use a on-premise mail server using SAP CLOUD SDK JAVA. I didn't find any example of how to do it. I know that in case of javascript there's "email-client" (https://sap.github.io/cloud-sdk/docs/js/features/mail-client#on-premise-destination), but for java?

I found this guide: https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/using-tcp-protocol-for-cloud-applications?locale=en-US

But it's not a full example, and it's not very clear. Right now, I have a working code that uses Java Mail to send mails using a mail destination (getting destination properties and creating the mail session), but i don't have very clear how to do it with an on-premise destination and use the configured cloud connector.

Could someone share some code example?

Thanks.