Re: Oracle Java Mail Question
Date: 28 Jun 2005 12:48:35 -0800
Message-ID: <42c1a993_at_news.victoria.tc.ca>
amerar_at_iwc.net wrote:
: I appreciate the response. One would think that text/html is the
: default. But, maybe not. At any rate, I am not a Java programmer, and
: do not know a lot about Java. So, I may need some help here.
: I'll take a look at what Java routines there are. I installed the
: Oracle JVM per the manual and made no other changes. I'm not sure
: where to look.
: The routine does not accept a header or content type. Only the basic
: fields; from, to, cc, subject, attachment.
: I've attached the call to the routine for your review in case you have
: some idea.....
: create or replace function send(
: p_from in varchar2,
: p_to in varchar2,
: p_cc in varchar2,
: p_bcc in varchar2,
: p_subject in varchar2,
: p_body in varchar2,
: p_smtp_host in varchar2,
: p_attachment_data in bfile,
: p_attachment_type in varchar2,
: p_attachment_file_name in varchar2) return number
: as
: language java name 'mail.send( java.lang.String,
: java.lang.String,
: java.lang.String,
: java.lang.String,
: java.lang.String,
: java.lang.String,
: java.lang.String,
: oracle.sql.BFILE,
: java.lang.String,
: java.lang.String
: ) return oracle.sql.NUMBER';
Sorry, I have never used this so I can't say much more.
HOWever, I notice p_attachment_*, so you could presumably send an html attachment, which would be a work around.
ALSO, a gludge might allow the attachment to be displayed inline, (i.e. it appears as part of the message). I have used something similar before that before might work here.
Use the following string as the p_attachment_type
"text/html\r\nContent-disposition: inline;"
Notice the line break followed by another header. This trick might allow you to stuff in extra headers, such as the one shown.
Otherwise you need to be lucky. Perhaps the oracle interface includes addition options, perhaps some kind of install default for the default message content type. Or, you need access to the java code.
OR, you might have a way to filter the messages being sent, and the filter could add the necessary mime headers. Send all messages to a local address and forward them through such a filter. Of course that starts to becomes more work than I would hope to do.
$0.10
-- This space not for rent.Received on Tue Jun 28 2005 - 22:48:35 CEST