I need to send email with csv attachment. Im trying to use UTL_MAIL.SEND_ATTACH_VARCHAR2 and its working, but first row is always empty. (contains CRLF).
How to remove this empty row? Why does Oracle put CRLF characters on the first line?
Thanks everyone for the advice.
PROCEDURE SEND_CSV_ATTACHMENT2 AS
v_sender VARCHAR2(130);
v_attachment CLOB := 'xas';
BEGIN
v_sender := 'someone@abcd.com';
UTL_MAIL.send_attach_varchar2(sender => v_sender,
recipients => 'name@some.eu',
subject => 'some subject',
message => 'some message',
mime_type => 'text/html', -- send html e-mail
attachment => v_attachment,
att_inline => false,
att_mime_type => 'text',
att_filename => 'someName.csv');
END SEND_CSV_ATTACHMENT2;