I developed a program that send an email and here the snippets of my codes. The problem here is when I receive the actual mail in my inbox, the SENDER name changes into characters/symbols together with the CONTENT of the email. But when I debug, the sender and content are all readable english characters.
Does anyone knows what causes this issue?
send_request = cl_bcs=>create_persistent( ).
lp_pdf_size = XSTRLEN( l_bin_file ).
pdf_content = cl_document_bcs=>xstring_to_solix(
ip_xstring = l_bin_file ).
document = cl_document_bcs=>create_document(
i_type = lc_pdf
i_hex = pdf_content
i_length = lp_pdf_size
i_subject = l_pdf_file ).
add document to send request
send_request->set_document( document ).
LOOP AT li_user_addr1 INTO lwa_user_addr1.
MOVE lwa_user_addr1-address TO l_address.
add recipient (e-mail address)
recipient = cl_cam_address_bcs=>create_internet_address(
i_address_string = l_address ).
add recipient to send request
CALL METHOD send_request->add_recipient
i_recipient = recipient
i_express = lwa_user_addr1-sndex
i_copy = lwa_user_addr1-sndcp
i_blind_copy = lwa_user_addr1-sndbc.
sets the text to be display in email
append 'This is my little note' to notes.
call method send_request->set_note( notes ).
sent_to_all = send_request->send(
i_with_error_screen = lc_x ).
CATCH cx_bcs INTO bcs_exception.
WRITE: text-002, bcs_exception->error_type.