Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: double line spacing in smtp
Hi,
I can send e-mails ok with attachments ok (system = 9.2.0.6 windows 2000 server) my problem is with this particular type of file. It's got printer esc sequences to turn things into bold etc in and special chars for vertical and horizontal lines and the like. If I tell it to process as plain text it translates some of the characters so I lose the formatting. If I treat it as binary it gets the basic formatting right but adds the extra line.
I used the demo_mail package on the oracle site as an example for using smtp and this is the one of the many attempts to use successfully.
DECLARE
conn utl_smtp.connection; req utl_http.req; resp utl_http.resp; data RAW(32767); v_file_handle utl_file.file_type;v_file_name VARCHAR2(60) := 'wor020_665126.lis'; i PLS_INTEGER;
flen NUMBER; bsize NUMBER; ex BOOLEAN;
sender => 'Me <me_at_some-company.com>', recipients => 'Mike <mike.sztanko_at_stroud.gov.uk>', subject => 'Attachment Test', mime_type => demo_mail.MULTIPART_MIME_TYPE); demo_mail.attach_text( conn => conn, data => '<h1>Hi! This is a test.</h1>',mime_type => 'text/html');
utl_file.fgetattr('ORABIN', v_file_name, ex, flen, bsize); v_file_handle := utl_file.fopen('ORABIN', v_file_name, 'r' ); utl_file.get_raw(v_file_handle, data, flen); utl_file.fclose(v_file_handle);
demo_mail.attach_base64(conn => conn, data => data, mime_type => 'application/octet-stream', inline => TRUE, filename => v_file_name, last => TRUE);
END; Received on Mon Sep 26 2005 - 08:50:51 CDT