• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 521
  • Last Modified:

Sending mails larger than 32k from Oracle 8i

Any one has an idea how to send mails larger than 32k from Oracle 8i.
Thanks to help.
Brian.
0
brianvanschellebeck
Asked:
brianvanschellebeck
  • 4
  • 3
1 Solution
 
jwahlCommented:
do you mean the mail body larger than 32k? you could add a text attachment for this.
unfortunatly utl_smtp doesn't support attachments.
how do you send mails now?
0
 
brianvanschellebeckAuthor Commented:
I currently use utl_smtp but I am limited to a body of 32k.
0
 
jwahlCommented:
do you want to send the body as attachment? if so, there are lots of workarounds to enable UTL_SMTP to send attachments. if you're interested, i can post some links.
0
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
brianvanschellebeckAuthor Commented:
Unfortunately, that won't fit my purpose. I understand that this is not possible using utl_smtp.
Thanks for the help.
How do I close this question without accepting any solution?
0
 
jwahlCommented:
another possibility is to pass the message as CLOB (Character Large Object) type. this has a maximum length of 4 gb. you just have to modify you e-mail package (or create a new one) to enable UTL_SMTP to accept CLOBs.

is this an option for you?
0
 
brianvanschellebeckAuthor Commented:
Of course, I would appreciate if you could more info.

Regards,
Brian.
0
 
jwahlCommented:
my own mail procedure looks like this:

i pass the paramater p_clob as type CLOB and in declaration sector of the procedure i put this code:

DECLARE
        ...
        v_file             CLOB := p_clob;
        v_linelen CONSTANT PLS_INTEGER := 2000;
        v_len              PLS_INTEGER := DBMS_LOB.getlength (p_clob);
        ...
BEGIN
        ... -- open e-mail connection
        ... -- write receipts, subject, ...
        ...
        IF p_clob IS NOT NULL THEN
            --
            DBMS_LOB.OPEN (lob_loc =>                        v_file, open_mode => DBMS_LOB.lob_readonly);
            --
            WHILE v_pos <= v_len
            LOOP
                v_mesg := DBMS_LOB.SUBSTR (v_file
                                          ,v_linelen
                                          ,v_pos);
                v_chunk := LENGTH (v_mesg);
                UTL_SMTP.write_data (p_conn, v_mesg);
                v_pos := v_pos + v_chunk;
            END LOOP;
            --
            DBMS_LOB.CLOSE (lob_loc =>                        v_file);
        END IF;
        ...
        ... -- send e-mail
        ... -- close e-mail
END;

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now