Home » SQL & PL/SQL » SQL & PL/SQL » Sending PDF through mail (merged 3) (Oracle 9i)
icon6.gif  Sending PDF through mail (merged 3) [message #443512] Tue, 16 February 2010 01:53 Go to next message
GKANAND
Messages: 17
Registered: June 2009
Junior Member
Dear Friends,

I have written a procedure to send a pdf file through mail. The directory was created and registered in SYS.DBA_DIRECTORIES
with read,write grant access. But im getting the below error.

******
ORA-20014: Error in MAIL_FILES_PRO ORA-20012: Invalid Operation
ORA-06512: at "ANAND.PRO_ICTPAYSLIPMAIL02", line 229
ORA-06512: at line 2
******

I have attached the procedure in the below txt file.


Re: Sending PDF file through mail [message #443522 is a reply to message #443512] Tue, 16 February 2010 02:30 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Lose the WHEN OTHERS error handler and try again.

That way we'll be able to see the actual line the error happened at.
Re: Sending PDF file through mail [message #443528 is a reply to message #443512] Tue, 16 February 2010 02:45 Go to previous messageGo to next message
Michel Cadot
Messages: 63805
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You didn't attach anything to your post.

Also, use SQL*Plus and copy and paste your session including line numbers.

Regards
Michel
Re: Sending PDF file through mail [message #443533 is a reply to message #443522] Tue, 16 February 2010 02:57 Go to previous messageGo to next message
GKANAND
Messages: 17
Registered: June 2009
Junior Member
Dear Michel,

I hve attached the procedure called "PRO_ICTPAYSLIP.TXT" in the forum.
Re: Sending PDF file through mail [message #443536 is a reply to message #443533] Tue, 16 February 2010 02:59 Go to previous messageGo to next message
Michel Cadot
Messages: 63805
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You didn't attach it in the topic I have answered which no more exist now as Moderators have merged them and deleted duplicates.
Now post what have been asked.

Regards
Michel
Re: Sending PDF file through mail [message #443575 is a reply to message #443536] Tue, 16 February 2010 05:27 Go to previous messageGo to next message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
As JRowbottom already suggested..

Remove the bold oneQuote:
EXCEPTION
WHEN utl_smtp.invalid_operation THEN
RAISE_APPLICATION_ERROR(-20013, 'error');
WHEN OTHERS THEN
IF UTL_FILE.IS_OPEN(v_file_handle) THEN
UTL_FILE.FCLOSE (v_file_handle);
END IF;
RAISE_APPLICATION_ERROR(-20014, 'Error in MAIL_FILES_PRO'||' '||SQLERRM);
END Pro_Ictpayslipmail02;

from your code to see the actual error occured at which line of your code.
As the line 229 is nothing But Your cutom message.

sriram Smile
Re: Sending PDF file through mail [message #443686 is a reply to message #443522] Tue, 16 February 2010 23:47 Go to previous messageGo to next message
GKANAND
Messages: 17
Registered: June 2009
Junior Member
I Hve removed all WHEN OTHERS exception and i got the below error.

ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 449
ORA-29283: invalid file operation
ORA-06512: at "ANAND.PRO_ICTPAYSLIPMAIL02", line 166
ORA-06512: at line 2


This error code refers directory privileges. I hve granted read,write access to the directory.
The folder is created in file server and the shared file server is able to open in Database server.
Re: Sending PDF file through mail [message #443691 is a reply to message #443686] Wed, 17 February 2010 00:21 Go to previous message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
On which OS you are executing this?
why dont you show us What you tried and got through sql* plus as Michel suggeted?
The path of directory "ICTMAIL" does it have all the privileges how you granted them?


Have a look at this...
Or provide valid information...

http://www.oracle-base.com/forums/viewtopic.php?f=2&t=8941


sriram
Previous Topic: Alternative Of Soundex Function
Next Topic: wats wrong in the query
Goto Forum:
  


Current Time: Tue Sep 27 00:47:05 CDT 2016

Total time taken to generate the page: 0.27696 seconds