plsql - Multiple Attachment problems in PL/SQL using utl_smtp package -


I am using the code from this link to send attachments in our system's email notifications;

The problem is that the second attachment has an encoding problem, if I send it in a text file, then the text will be mashed in the text file. If properly printed then 'b' u [ÈØ]] \ <[Ý h] then it continues with the text and so happens even after 23 letters ...

The first attachment For, I print the MIME border;

  utl_smtp.write_data g_mail_conn, chr (13) || Chr (10) || Chr (13) || Chr (10) || '-' || L_boundary || Chr (13) || Chr (10)); Utl_smtp.write_data (g_mail_conn, 'content-dispute: attachment; filename = "test2.txt"' chr (13) || chr (10)); Utl_smtp.write_data (g_mail_conn, 'content-transfer-encoding: base64') CRR (13) || CR (10));  

Then I run the loop which I took from the link (also copied below) and after the loop, I reset the v_offset variable, then I gave it above The second boundary for the attachment is to enter the code. Then I

  utl_smtp.write_data (g_mail_conn, chr (13) || chr (10) || '-' | | l_boundary | | '-' || CRR (13));   

Any idea why this problem is happening? While v_offset & lt; V_length loop dbms_lob.read (p_blob, v_buffer_size, v_offset, v_raw); Utl_smtp.write_raw_data (c, utl_encode.base64_encode (v_raw)); Utl_smtp.write_data (c, utl_tcp.crlf); V_offset: = v_offset + v_buffer_size; End Loop while_loop;

I just found a solution ...

v_buffer_size variable dbms_lob The .read () process was being modified, so before setting up the new file, I had to reset v_offset to 1 as well as reset it to 57.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -