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:
- BTP Cockpit → Your Subaccount → Connectivity → Cloud Connector
- Verify ‘Status’ shows ‘Connected’ with green indicator
- For Office365 (external cloud service), no Cloud Connector routing needed
- Traffic flow: S/4HANA → BTP Connectivity Service → Office365
- 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:
- Cloud Connector must have outbound internet access to reach Office365
- Configure proxy in Cloud Connector if it sits behind corporate proxy
- 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:
- Don’t use regular user password in BTP destination
- Generate app-specific password: Office365 Admin → Security → App Passwords
- Use app password in mail.password property
- 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.