Home » SQL & PL/SQL » SQL & PL/SQL » email attachment >32k in 10g
email attachment >32k in 10g [message #206192] Wed, 29 November 2006 02:19 Go to next message
prisa
Messages: 2
Registered: November 2006
Location: mumbai
Junior Member

Hi there..

I m using Oracle Database 10g Enterprise Edition Release 10.1.0.5.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options.

I have tried utl_mail , UTL_SMTP to send mail with attachment >32k.
but no use.

Attachment is XML file.


kindly do reply as soon as possible.

Regards,
prisa

Re: email attachment >32k in 10g [message #206194 is a reply to message #206192] Wed, 29 November 2006 02:35 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
Compress the XML file before you send it. Alternatively, split the file in 32K chunks and send using multiple mail messages.
Re: email attachment >32k in 10g [message #206197 is a reply to message #206192] Wed, 29 November 2006 02:50 Go to previous messageGo to next message
prisa
Messages: 2
Registered: November 2006
Location: mumbai
Junior Member

I want to send it in one mail.
it is application business requirement.

can you tell me how to compress from plsql in unix server.



Re: email attachment >32k in 10g [message #206203 is a reply to message #206197] Wed, 29 November 2006 03:25 Go to previous messageGo to next message
suvv
Messages: 17
Registered: October 2006
Junior Member
hi ,

32 k is the limit for utl_mail.
But we can send the attachment for more than 32k using the UTL_SMTP
feature.

You have to ask to oracle support to how to do this for UTL_SMTP.
But i am sure we can do this using UTL_SMTP.
Re: email attachment >32k in 10g [message #206232 is a reply to message #206192] Wed, 29 November 2006 04:20 Go to previous message
roselan
Messages: 7
Registered: November 2006
Location: Lausanne, Switzerland
Junior Member

yes you can.

This is not trivial, as you need to use base64 encoding, and use chuncks (you loop on utl_smtp.write_raw_data)

I don't have the code with me, but wait... google is my friend Very Happy

http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/maildemo_sql.txt

look for the attach_base64 proc (or just compile the full pkg).

hope this help.
Previous Topic: Tricky query
Next Topic: Need Help for SQL Query
Goto Forum:
  


Current Time: Sat Dec 10 12:47:21 CST 2016

Total time taken to generate the page: 0.09156 seconds