Hi All,
I am sending mail using below code and it is displaying perfectly in outlook but in SOST it is not displaying properly . ( Image are displaying with X symbol and attaching as attachments )
if o_mr_api is initial.
o_mr_api = cl_mime_repository_api=>if_mr_api~get_api( ).
endif.
call method o_mr_api->get
exporting
i_url = '/SAP/PUBLIC/2.jpg'
importing
e_is_folder = is_folder
e_content = l_img2
e_loio = l_loio
exceptions
parameter_missing = 1
error_occured = 2
not_found = 3
permission_failure = 4
others = 5.
while l_img2 is not initial.
ls_hex-line = l_img2.
append ls_hex to lt_hex2.
shift l_img2 left by 255 places in byte mode.
endwhile.
l_document = cl_document_bcs=>create_document(
i_type = 'HTM'
i_subject = lv_sub
i_text = lt_obj_cont ).
* Attaching images to Email Body
l_document->add_attachment(
exporting
i_attachment_type = 'jpg' " Document Class for Attachment
i_attachment_subject = 'img1' " Attachment Title
i_attachment_size = lv_img1_size " Size of Document Content
i_att_content_hex = lt_hex1 " Content (Binary)
).
after this I am sending email by using CL_BCS .
Images are attached as attachments
in Email Body Images are displaying like below.
Please guide how to rectify this issue.
Thanks in Advance.
Regards,
Krishna