09-30-2015 2:44 PM
By using the following coding, I expect to find a internet-mail in SOST (unsent, because it's a test system, but it has to be there).
What I'm doing wrong???
DATA: ex_bcs TYPE REF TO cx_bcs.
TRY.
" create mail document
DATA(mail) = cl_document_bcs=>create_document(
i_text = VALUE #( ( CONV so_text255( 'Testmail' ) ) )
i_type = 'RAW'
i_subject = 'Testsubject' ).
DATA(send_request) = cl_bcs=>create_persistent( ).
send_request->set_document( mail ).
send_request->set_sender( i_sender = cl_cam_address_bcs=>create_internet_address( 'test@test.de' ) ) ##NO_TEXT.
send_request->add_recipient( i_recipient = cl_cam_address_bcs=>create_internet_address( 'test@test.de' ) ).
CATCH cx_address_bcs
cx_send_req_bcs
cx_bcs
INTO ex_bcs.
MESSAGE ID ex_bcs->msgid TYPE ex_bcs->msgty NUMBER ex_bcs->msgno
WITH ex_bcs->msgv1 ex_bcs->msgv2 ex_bcs->msgv3 ex_bcs->msgv4.
ENDTRY.
" do not forget to commit, otherwise the mail will not be sent!
IF send_request->send( i_with_error_screen = abap_true ) = abap_true.
COMMIT WORK.
ENDIF.
" I expect to find an SOST entry, now.
09-30-2015 2:52 PM
09-30-2015 2:48 PM
I suppose the background job scheduled to send mail is not active (check with transaction SCOT) you could manually execute report RSCONN01.
Regards,
Raymond
09-30-2015 3:04 PM
But in this case, I have to see the unsent mail with a yellow status indicator in SOST.
Principially, mailing works, there MUST be an error in my coding.
09-30-2015 3:37 PM
Are you sure it is not in SOST?
Change max no of hits on period tab to and at send status tab add all options. Or tick the first checkbox in the Options tab.
10-01-2015 7:04 AM
09-30-2015 2:50 PM
Hi,
Are the settings in SCOT correct?
Sometimes there are filters active prohibiting certain addresses.
Kind regards, Rob Dielemans
09-30-2015 3:15 PM
SOST works as expected, there are masses of mails "waiting for communication service" (yellow status light), but only my mails do not arrive there
09-30-2015 2:52 PM
09-30-2015 3:09 PM
This report will send the whole SOST queue, right? There are hundreds of "yellow" mails, which shouldn't be sent.....
09-30-2015 3:50 PM
Hi Ralf,
there is no error in your code: I've pasted your code to a Z report and i've the test email waiting in SOST with yellow status.
Maybe something with customizing ? ....
Regards
09-30-2015 4:22 PM
OK, if YOU tell me, that in your system my coding is working fine, I know that my coding is correct and I have to check the customizing.
Thank you very much!!!!
09-30-2015 4:27 PM
You can see it in the image attached, also i've checked some working examples here in my system with BCS classes and the code is essentially the same.
I was thinking, maybe something related about your user's authorizations or roles? .
Regards,