Skip to Content
0
Former Member
Nov 14, 2011 at 07:31 AM

Issue while sending multiple external mails

154 Views

I am facing issue while sending multiple external mails. Its showing a same reciepnt when i am looking in SOST.

Suppose I m sending mail to three recivers under using loop, its showing first email ID of recipent for all three different ID's.

its showing three mail in sost but recipent is same of first for all three mails...

Below is my code

loop at it_mailid into wa_mailid.

lp_email = wa_mailid-EMAIL_ID.

TRY.

lv_recipient = cl_cam_address_bcs=>create_i

CATCH cx_address_bcs INTO lv_cx_address

ENDTRY.

TRY.

CALL METHOD lv_send_request->add_reci

EXPORTING

i_recipient = lv_recipient

i_express = c_true.

CATCH cx_bcs INTO lv_bcs_exception.

ENDTRY.

TRY.

CALL METHOD lv_send_request->send(

EXPORTING

EXPORTING

i_with_error_screen = c_true

RECEIVING

result = lv_sent_to_all ).

endtry.

endloop.