{"id":7869,"date":"2025-09-17T23:23:39","date_gmt":"2025-09-17T17:53:39","guid":{"rendered":"https:\/\/www.sapewmhelp.com\/?question=steps-to-create-a-mail-destination-in-sap-btp-cockpit"},"modified":"2025-09-17T23:23:39","modified_gmt":"2025-09-17T17:53:39","slug":"steps-to-create-a-mail-destination-in-sap-btp-cockpit","status":"publish","type":"question","link":"https:\/\/www.sapewmhelp.com\/?question=steps-to-create-a-mail-destination-in-sap-btp-cockpit","title":{"rendered":"Steps to Create a Mail Destination in SAP BTP Cockpit"},"content":{"rendered":"<ul>\n<li>\n<p><strong>Log in to BTP Cockpit<\/strong><\/p>\n<ul>\n<li>\n<p>Go to <a target=\"_new\" class=\"decorated-link cursor-pointer\">SAP BTP Cockpit<span><\/span><\/a> (or your landscape, e.g., <code>eu10.hana.ondemand.com<\/code>).<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Navigate to Your Subaccount<\/strong><\/p>\n<ul>\n<li>\n<p>Select your <strong>subaccount<\/strong> where your app\/service will run.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Go to Destinations<\/strong><\/p>\n<ul>\n<li>\n<p>In the left-hand menu \u2192 <strong>Connectivity \u2192 Destinations<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Create a New Destination<\/strong><\/p>\n<ul>\n<li>\n<p>Click <strong>New Destination<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Fill in details for your mail server, for example:<\/p>\n<\/li>\n<\/ul>\n<p><strong>Example: SMTP Mail Destination<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>Name: SMTP_MAIL<br \/>\nType: SMTP<br \/>\nDescription: SMTP Server for Email<br \/>\nMail Server: smtp.office365.com<br \/>\nPort: 587<br \/>\nAuthentication: BasicAuthentication<br \/>\nUser: your-email@company.com<br \/>\nPassword: &lt;app password or SMTP password&gt;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Additional Properties:<\/strong><\/p>\n<p>mail.smtp.auth = true<br \/>\nmail.smtp.starttls.enable = true<\/p>\n<p>&nbsp;<\/p>\n<ol>\n<li>\n<p><em>(If your company uses another SMTP, replace accordingly.)<\/em><\/p>\n<\/li>\n<li>\n<p><strong>Save &amp; Test<\/strong><\/p>\n<ul>\n<li>\n<p>Save the destination.<\/p>\n<\/li>\n<li>\n<p>Use the <strong>Check Connection<\/strong> button to ensure it works.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><strong>Sending Emails from BTP Apps<\/strong><\/p>\n<p>Once the destination is created:<\/p>\n<ul>\n<li>\n<p>In <strong>CAP (Cloud Application Programming)<\/strong> or <strong>Node.js\/Java apps<\/strong> running on BTP, you can call the destination using the <strong>Destination Service API<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Example: use <code>@sap-cloud-sdk\/connectivity<\/code> (Node.js) or <code>com.sap.cloud.sdk.cloudplatform.connectivity.DestinationAccessor<\/code> (Java) to fetch SMTP config and send emails via a mail library.<\/p>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Alternative: SAP BTP Mail Service<\/strong><\/p>\n<p>Instead of configuring SMTP yourself:<\/p>\n<ul>\n<li>\n<p>Some BTP regions provide a <strong>Mail Service (Mail API)<\/strong> that can be used directly for outbound mail without handling SMTP configuration.<\/p>\n<\/li>\n<li>\n<p>Check if your subaccount entitlements include <strong>&#8220;Mail&#8221; service<\/strong>.<\/p>\n<\/li>\n<\/ul>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","question-category":[176],"question_tags":[178,201,434,177,433],"class_list":["post-7869","question","type-question","status-publish","hentry","question-category-sapbtp","question_tags-abap","question_tags-btp","question_tags-mail","question_tags-sap","question_tags-smtp"],"_links":{"self":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question\/7869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question"}],"about":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7869"}],"wp:attachment":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7869"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion-category&post=7869"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion_tags&post=7869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}