Skip to Content
0
Former Member
Feb 24, 2011 at 10:19 AM

Sender Name and Content turns to be ASCII Characters

21 Views

Hello experts,

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?

*_sample code_

TRY.

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

EXPORTING

i_recipient = recipient

i_express = lwa_user_addr1-sndex

i_copy = lwa_user_addr1-sndcp

i_blind_copy = lwa_user_addr1-sndbc.

ENDLOOP.

  • sets the text to be display in email

append 'This is my little note' to notes.

call method send_request->set_note( notes ).

  • send document

sent_to_all = send_request->send(

i_with_error_screen = lc_x ).

CATCH cx_bcs INTO bcs_exception.

WRITE: text-001.

WRITE: text-002, bcs_exception->error_type.

EXIT.

ENDTRY.

*sample result

SENDER NAME:

ê`/>€è/_/>?

CONTENT :

èÇÑË?ÑË?_`?%ÑÈÈ%Á?>?ÈÁ

?

àÁ/Ê?êÁÄÑøÑÁ>È?

?

?èÇÑË?ÑË?/?ÈÁËÈ??Ã?>ÁÏ?ÃÍ>ÄÈÑ?>/%ÑÈ`?Ã?Ê?ËÁ>ÀÑ>Å??ÍÈøÍÈ?]í???ÎÑ/?Á_/Ñ%

?

?âÁËÈ?êÁÅ/ÊÀË

?