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@apollogrp.e du>
'||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(sysd ate,'Day, DD Mon YYYY
HH:MI:SS')||crl f);
utl_smtp.write_ data(conn, 'MIME-Version: 1.0'||crlf);
utl_smtp.write_ data(conn, 'Content-Type: '||v_content_ty pe||'
'||crlf);
utl_smtp.write_ data(conn, ' boundary"'||v_b oundary||'"'||c rlf);
utl_smtp.write_ data(conn, 'X-Priority: '||v_priority|| ' '||crlf);
utl_smtp.write_ data(conn , 'X-Unsent: 1'||utl_tcp.CRL F);
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 MimeOLE
V5.00.2919.6700 '||crlf);
I saved the email as a .txt file to see what was going on:
From: Curious George [cg@apollogrp.ed u]
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
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@apollogrp.e du>
'||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(sysd ate,'Day, DD Mon YYYY
HH:MI:SS')||crl f);
utl_smtp.write_ data(conn, 'MIME-Version: 1.0'||crlf);
utl_smtp.write_ data(conn, 'Content-Type: '||v_content_ty pe||'
'||crlf);
utl_smtp.write_ data(conn, ' boundary"'||v_b oundary||'"'||c rlf);
utl_smtp.write_ data(conn, 'X-Priority: '||v_priority|| ' '||crlf);
utl_smtp.write_ data(conn , 'X-Unsent: 1'||utl_tcp.CRL F);
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 MimeOLE
V5.00.2919.6700 '||crlf);
I saved the email as a .txt file to see what was going on:
From: Curious George [cg@apollogrp.ed u]
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