UTL_SMTP Stripping MIME-Version header information
Date: 3 Mar 2005 08:45:15 -0800
Message-ID: <1109868315.366359.64980_at_g14g2000cwa.googlegroups.com>
Hello,
I am attempting to attach a .pdf file to an email generated using oracle's utl_smtp. I am working on Oracle9i Enterprise Edition Release 9.2.0.4.0. I beleive that the utl_smtp.write_data is stripping out part of what I am passing to it. Here is the code I am having trouble with:
utl_smtp.write_data(conn, 'From: "Curious George" <cg_at_apollogrp.edu>
'||crlf);
utl_smtp.write_data(conn, 'To: "Scott Watson" <'||v_recipient||'>
'||crlf);
utl_smtp.write_data(conn, 'Subject: '||v_subject||' '||crlf);
utl_smtp.write_data(conn, 'Date: '||to_char(sysdate,'Day, DD Mon YYYY
HH:MI:SS')||crlf);
utl_smtp.write_data(conn, 'MIME-Version: 1.0'||crlf);
utl_smtp.write_data(conn, 'Content-Type: '||v_content_type||'
'||crlf);
utl_smtp.write_data(conn, ' boundary"'||v_boundary||'"'||crlf); utl_smtp.write_data(conn, 'X-Priority: '||v_priority||' '||crlf); utl_smtp.write_data(conn , 'X-Unsent: 1'||utl_tcp.CRLF); utl_smtp.write_data(conn, 'X-MSMail-Priority: Normal'||crlf); utl_smtp.write_data(conn ,'X-Unsent: 1'||crlf); utl_smtp.write_data(conn ,'X-MimeOLE: Produced By Microsoft MimeOLEV5.00.2919.6700'||crlf);
I saved the email as a .txt file to see what was going on:
From: Curious George [cg_at_apollogrp.edu]
Sent: Thursday, March 03, 2005 1:49 AM
To: Scott Watson
Subject: Store IRN Nbr for all Factulty
Importance: High
The 'From:', 'To:' and 'Subject:' are written correctly but the rest is stripped out. The x-priority is changed to 'Importance' so I am assuming that utl_smtp is checking out what I am passing and making changes to or excluding some information that is passed.
If I remove the 'Importance: High' and replace it with the information that was stripped out the attachment works.
I guess my question is, why is this information being stripped out, does utl_smtp not support setting up the MIME information? And can I view the source code of the utl_smtp package to see exactly what it is doing when it removes this information?
Regards,
Scott Watson Received on Thu Mar 03 2005 - 17:45:15 CET