Billing output emails not sent due to SMTP configuration error in SCOT connection test after S/4HANA 1909 migration

After migrating to S/4HANA 1909 cloud edition, our billing document output emails stopped working. Invoices generate successfully but the email output type fails silently. Transaction SCOT shows the SMTP node configured but testing connection gives error:


SMTP connection test failed
Error: Connection refused (111)
Host: smtp.office365.com:587

Our on-premise system used the same SMTP settings without issues. Cloud firewall rules should allow outbound port 587. SAP Cloud Connector is running and connected. The billing output determination correctly triggers email type but messages stay in SOST with status ‘waiting’. Is there a specific cloud configuration needed for SCOT SMTP setup that differs from on-premise?

Let me provide the complete solution addressing all three focus areas - SCOT SMTP setup for cloud, firewall rules, and SAP Cloud Connector configuration:

Understanding the Cloud Architecture: S/4HANA cloud editions (1909 onwards) implement strict network isolation. Unlike on-premise systems, you cannot configure direct SMTP connections in SCOT to external mail servers. All outbound communication must route through SAP BTP connectivity services.

SCOT SMTP Setup for Cloud:

Step 1 - Create BTP Mail Destination:

  • BTP Cockpit → Connectivity → Destinations → New Destination
  • Configuration:

Name: SMTP_OFFICE365
Type: Mail
mail.smtp.host: smtp.office365.com
mail.smtp.port: 587
mail.smtp.starttls.enable: true
mail.smtp.auth: true
mail.user: <service-account@yourdomain.com>
mail.password: <app-password>
mail.transport.protocol: smtp

Step 2 - Configure SCOT to Use BTP Destination:

  • Transaction SCOT → Settings → Create/Change Node
  • Node Name: SMTP_BTP
  • Address Type: Internet (SMTP)
  • Mail Host: Leave empty (will use destination)
  • Additional Settings → Use BTP Destination: Check this box
  • BTP Destination Name: SMTP_OFFICE365
  • Set as Default Node for Internet Mail

Step 3 - Test Configuration:


Transaction: SBWP
Create new message → Send via Internet
Check SOST for transmission status
Should show 'Transferred' not 'Waiting'

Cloud Firewall Rules Configuration:

The key insight: You don’t configure traditional firewall rules because traffic doesn’t flow directly from S/4HANA to Office365. Instead, configure BTP subaccount network policies:

  1. BTP Cockpit → Your Subaccount → Connectivity → Cloud Connector
  2. Verify ‘Status’ shows ‘Connected’ with green indicator
  3. For Office365 (external cloud service), no Cloud Connector routing needed
  4. Traffic flow: S/4HANA → BTP Connectivity Service → Office365
  5. BTP handles all firewall/proxy requirements automatically

If you need to route through on-premise mail relay instead:

  • Cloud Connector → Cloud to On-Premise → Add System Mapping
  • Backend Type: Non-SAP System
  • Protocol: TCP
  • Internal Host: your-mail-relay.internal.com
  • Internal Port: 25 or 587
  • External Host: mail-relay-virtual (virtual hostname for SCOT)
  • Then in SCOT, use ‘mail-relay-virtual’ as mail host

SAP Cloud Connector Considerations:

For direct cloud-to-cloud (S/4HANA cloud → Office365):

  • Cloud Connector is NOT used - BTP destination service handles connectivity
  • Cloud Connector is only needed if routing through on-premise mail server

If using on-premise mail relay:

  1. Cloud Connector must have outbound internet access to reach Office365
  2. Configure proxy in Cloud Connector if it sits behind corporate proxy
  3. Test connectivity: Cloud Connector UI → Connector → Check Service Channels

Troubleshooting Commands:

Verify BTP destination from S/4HANA:

  • Transaction SM59 → HTTP Connections to External Server
  • Should see your SMTP_OFFICE365 destination listed
  • Test connection - should return success

Check email queue:


Transaction: SOST
Filter by date and status 'Waiting'
Select message → Display → Check error details
Common errors:
- 'No BTP destination found' - destination name mismatch
- 'Authentication failed' - verify Office365 credentials
- '550 Relay denied' - sender address not in Office365 accepted domains

Verify billing output configuration:

  • Transaction NACE → Application V3 (Billing)
  • Output Type: Mail
  • Medium: 5 (External Send)
  • Program: RLB_INVOICE
  • Form: Your billing form
  • Test output: VF03 → Select invoice → Issue Output To → Mail

Special Configuration for Office365:

Office365 requires app passwords for SMTP authentication:

  1. Don’t use regular user password in BTP destination
  2. Generate app-specific password: Office365 Admin → Security → App Passwords
  3. Use app password in mail.password property
  4. Ensure service account has ‘Send As’ permissions for billing email addresses

Validation Checklist:

  • [ ] BTP destination created with correct Office365 settings
  • [ ] SCOT node configured to use BTP destination (not direct SMTP)
  • [ ] SM59 shows successful connection test to destination
  • [ ] SBWP manual email test successful
  • [ ] SOST shows ‘Transferred’ status for test email
  • [ ] NACE output type configured with correct medium
  • [ ] Billing document test output successful

The fundamental difference from on-premise: Cloud editions use BTP’s managed connectivity service which handles all network security, proxying, and firewall traversal. You configure destinations at BTP level and reference them in SCOT, rather than configuring direct SMTP connections. This architecture provides better security and compliance but requires understanding the BTP connectivity model.


This draft is based on general SAP S/4HANA knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.

Cloud deployments require explicit egress rules for SMTP. Check your BTP subaccount’s Cloud Connector configuration - you need to add the SMTP server as an accessible resource. In Cloud Connector admin UI, go to ‘Cloud to On-Premise’ and add smtp.office365.com with protocol TCP and port 587. Also verify your S/4HANA cloud instance has network routing to external mail servers enabled in the landscape settings.

I’ve dealt with this exact scenario. The issue is that S/4HANA cloud doesn’t allow direct SMTP connections to external servers for security reasons. You have two options: either route through SAP Cloud Connector to an on-premise mail relay, or use the SAP Document and Reporting Compliance service which handles email output via BTP. Check transaction SCOT - your SMTP node should point to the Cloud Connector virtual host, not directly to Office365. The Cloud Connector then forwards to your actual SMTP server. Also ensure your Cloud Connector has internet connectivity if it’s supposed to reach Office365 directly.

Thanks for the input. I checked Cloud Connector and there’s no SMTP resource defined. Should I add smtp.office365.com as a ‘Cloud to On-Premise’ resource even though it’s an external cloud service, not our on-premise system? That seems counterintuitive. Also, what should the ‘Internal Host’ field be set to if the SMTP server is Office365 in the cloud?

Confirmed this resolves the SCOT connection test failures — routing SMTP through BTP Connectivity Destinations instead of direct mail server config fixed our billing output emails immediately after 1909 migration.

You’re right to be confused - the naming is misleading. For cloud-to-cloud connections like S/4HANA cloud to Office365, you don’t use Cloud Connector at all. Instead, you need to configure the destination service in BTP cockpit with type ‘Mail’. Create a new destination with these properties: Type=Mail, Name=SMTP_BILLING, mail.smtp.host=smtp.office365.com, mail.smtp.port=587, mail.smtp.starttls.enable=true, mail.smtp.auth=true, plus your Office365 credentials. Then in SCOT, reference this BTP destination instead of direct SMTP connection. The key is that S/4HANA cloud uses BTP connectivity service for all external integrations, not direct socket connections like on-premise systems. Check SAP Note 2937317 for cloud SMTP configuration specifics.

Before going down the BTP destination route, verify the basics. In SCOT, your SMTP node configuration needs ‘Security’ set to ‘STARTTLS’ for Office365, not ‘None’ or ‘SSL/TLS’. Also check that authentication is enabled with valid credentials. Test using transaction SBWP - create a simple email and send it through the SMTP node. If that fails with the same connection error, the issue is definitely network-level. Check if your S/4HANA cloud instance has a NAT gateway or proxy configured for outbound internet access. Some cloud editions require explicit proxy settings in SCOT.

I see the confusion here - let me clarify the architecture. S/4HANA 1909 cloud edition blocks direct SMTP connections by design. The error ‘Connection refused (111)’ confirms this. Your only option is routing through SAP’s email service or a proxy. Check transaction SCOT_CLOUD (if available in your release) or use the standard SCOT with these cloud-specific settings: Set ‘Connection Type’ to ‘HTTP’ instead of ‘SMTP’, then configure the HTTP destination to point to SAP’s email gateway service.