cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Email de notificação de entrega

ayglonfernando
Explorer
0 Likes
875

Boa tarde!

Existe alguma maneira de, quando enviamos um pedido de compra por email, o comprador ser notificado de que o email foi entregue, recebendo um email com o OK? Quando tínhamos o sap ECC isso funcionava, porém agora no S/4 não funciona de maneira nenhuma. Estamos utilizando a classe CL_BCS para envio dos emails. 

A solicitação de leitura está funcionando, mas a de notificação de entrega do e-mail não chega de maneira alguma. Alguém tem uma luz pra me ajudar com isso? Obrigado

Accepted Solutions (0)

Answers (1)

Answers (1)

Chuma
Active Contributor
0 Likes

Hello @ayglonfernando 

Good day

I understand what you require: in addition to the read receipt, you also want an email delivery confirmation (DSN – Delivery Status Notification) when a purchase order is sent via CL_BCS.

Here’s the gist and how to troubleshoot it:

1) A read receipt is not the same as delivery confirmation.

  • The read receipt relies on the recipient’s mail client, which they can ignore.
  • Delivery confirmation (DSN) relies on the SMTP infrastructure along the route. ABAP can request DSN, but only the mail servers can generate and return a “delivered OK” (many providers send failure DSNs but not success DSNs).

2) In ABAP (CL_BCS)

Make sure you explicitly request delivery status before send( 😞

DATA(lo_send) = cl_bcs=>create_persistent( ).

lo_send->set_document( lo_doc ).

lo_send->add_recipient( lo_rec ).

 

" Request DSN / status mails (use constants available in your release)

lo_send->set_status_attributes(

  i_requested_status = 'ALL'    " SUCCESS/FAILURE/DELAY as policy allows

  i_status_mail      = 'ALWAYS' ).

 

lo_send->send( ).

 

Exact constants may vary by release; the key is: request DSN explicitly.

3) On the mail server side (usually the real blocker)

Ask your email/admin team to verify:

  • The SMTP relay employed by S/4 advertises the DSN extension, as indicated by EHLO showing DSN.
  • It is set up to send successful DSNs, not just NDRS or failures. Many relays, such as some Exchange/Office 365 configurations, don’t send successful DSNs by policy.
  • Your SAP sender/domain is permitted to receive those DSN reports (not filtered by anti-spam)..
  • On-prem/PCE only: in SCOT, the SMTP node has DSN/status options enabled, and the send/status jobs are scheduled.

In Public Cloud (SaaS), you don’t have SCOT access, so DSN behaviour is entirely up to your external mail provider.

4) Why does it work in ECC but not now

Most often, the SMTP path changes during the move (to a new relay/gateway that doesn’t issue successful DSNs). ABAP still requests DSN, but the server simply doesn’t send the “delivered” notification.

5) Practical paths forward

  • Confirm your code requests DSN (step 2) and your mail relay supports/permits successful DSNs (step 3).
  • If your provider won’t send successful DSNs, use operational alternatives:
    • rely on the outbound status/monitor (message transferred) and
    • treat bounces/NDRs as failures, or
    • Use your mail gateway’s delivery tracking report.

With kind regards

Chuma

GenAI Assit content (Useful references)DSN (SMTP extension): RFC 3461 – SMTP Service Extension for Delivery Status Notifications. IETF DatatrackerRFC Editor

Read receipts (MDN): RFC 8098 – Message Disposition Notification (successor to RFC 3798). IETF Datatracker

 CL_BCS method: SET_STATUS_ATTRIBUTES documentation (requesting status/DSN). SAP Help Portal

Exchange/Office 365 DSNs: Microsoft docs (NDRs are the common DSN type). Microsoft Learn

Public Cloud output email (no SCOT; use Output Management/external mail): SAP S/4HANA Cloud Output Management overview. SAP Community

 

ayglonfernando
Explorer
I believe that the problem is at our host. Thanks for your reply, it helps a lot.