-
Log in to BTP Cockpit
-
Go to SAP BTP Cockpit (or your landscape, e.g.,
eu10.hana.ondemand.com
).
-
-
Navigate to Your Subaccount
-
Select your subaccount where your app/service will run.
-
-
Go to Destinations
-
In the left-hand menu → Connectivity → Destinations.
-
-
Create a New Destination
-
Click New Destination.
-
Fill in details for your mail server, for example:
Example: SMTP Mail Destination
-
Name: SMTP_MAIL
Type: SMTP
Description: SMTP Server for Email
Mail Server: smtp.office365.com
Port: 587
Authentication: BasicAuthentication
User: your-email@company.com
Password: <app password or SMTP password>
Additional Properties:
mail.smtp.auth = true
mail.smtp.starttls.enable = true
-
(If your company uses another SMTP, replace accordingly.)
-
Save & Test
-
Save the destination.
-
Use the Check Connection button to ensure it works.
-
Sending Emails from BTP Apps
Once the destination is created:
-
In CAP (Cloud Application Programming) or Node.js/Java apps running on BTP, you can call the destination using the Destination Service API.
-
Example: use
@sap-cloud-sdk/connectivity
(Node.js) orcom.sap.cloud.sdk.cloudplatform.connectivity.DestinationAccessor
(Java) to fetch SMTP config and send emails via a mail library.
Alternative: SAP BTP Mail Service
Instead of configuring SMTP yourself:
-
Some BTP regions provide a Mail Service (Mail API) that can be used directly for outbound mail without handling SMTP configuration.
-
Check if your subaccount entitlements include “Mail” service.