‎2019 Mar 07 10:31 AM
Hi All,
I have a Requirement of Sending the Emails With Delayed Delivery, Just Like Outlook,
I Have Z-Program that sends a Remainder Emails, In which User Sets the date and time for Receiving Emails. Different Users sets a different time for getting the emails. We run the Program at 6 AM, and the User keeps time for around 10 AM.
Now My Program should generate Emails at 6 AM and reside in SOST Until the 10 AM and then sends to the Corresponding Receipent.
I am Using CL_BCS Class for Sending the Email.
Regards
Kranthi
‎2019 Mar 07 5:45 PM
Please check this thread. I think it has your answer:
https://archive.sap.com/discussions/thread/752394
Below is copied from that link:
You can send the email in the future using the OO methods as well. Just not well documented but if you dig into the class itself, you'll find that CL_BCS has a public attribute called SEND_REQUEST which is of type CL_SEND_REQUEST_BCS. This class has a method to set the send time.
Example below, I'll set it 6 minutes from now.
data: lv_timestamp type timestamp.
GET TIME STAMP FIELD lv_timestamp.
lv_timestamp = CL_ABAP_TSTMP=>ADD( tstmp = lv_timestamp secs = 360 ).
lr_cl_bcs->SEND_REQUEST->set_send_at( lv_timestamp ).
lr_cl_bcs->send( space ).
‎2019 Mar 07 5:45 PM
Please check this thread. I think it has your answer:
https://archive.sap.com/discussions/thread/752394
Below is copied from that link:
You can send the email in the future using the OO methods as well. Just not well documented but if you dig into the class itself, you'll find that CL_BCS has a public attribute called SEND_REQUEST which is of type CL_SEND_REQUEST_BCS. This class has a method to set the send time.
Example below, I'll set it 6 minutes from now.
data: lv_timestamp type timestamp.
GET TIME STAMP FIELD lv_timestamp.
lv_timestamp = CL_ABAP_TSTMP=>ADD( tstmp = lv_timestamp secs = 360 ).
lr_cl_bcs->SEND_REQUEST->set_send_at( lv_timestamp ).
lr_cl_bcs->send( space ).