Hi, Oracle experts,
I have some questions for sending e-mail with attachment files.
I have read “Ask Tom” about this topic from:
I am not Java expert and never used Java in Oracle. So I just followed step by step to download JavaMail API. But I do not have SYS userid and password and I sent that java files to our DBA and asked him to load them for me. After he told me it was ready, I copied java source “mail” which Tom provided. My questions are:
1. How can I compile the code? After I copied the code and tried to compile it, I got error:
create or replace and compile java source named "mail"
*
ERROR at line 1:
ORA-29536: badly formed source: User has attempted to load a class
(mail$BLOBDataSource) into a restricted package. Permission can be granted
using dbms_java.grant_permission(<user>, LoadClassInPackage...
Is that mean DBA should grant permission to me for using java package? What is command to grant?
2. Should the attachment files must be text file? Can I attach PDF files? What’s mean about dftMime = "application/octet-stream" inside java class mail code? What directory is for the attachment files? Can I put the files in my local directory or must be in database directory?
Thanks in advance
Jeanne
I have some questions for sending e-mail with attachment files.
I have read “Ask Tom” about this topic from:
I am not Java expert and never used Java in Oracle. So I just followed step by step to download JavaMail API. But I do not have SYS userid and password and I sent that java files to our DBA and asked him to load them for me. After he told me it was ready, I copied java source “mail” which Tom provided. My questions are:
1. How can I compile the code? After I copied the code and tried to compile it, I got error:
create or replace and compile java source named "mail"
*
ERROR at line 1:
ORA-29536: badly formed source: User has attempted to load a class
(mail$BLOBDataSource) into a restricted package. Permission can be granted
using dbms_java.grant_permission(<user>, LoadClassInPackage...
Is that mean DBA should grant permission to me for using java package? What is command to grant?
2. Should the attachment files must be text file? Can I attach PDF files? What’s mean about dftMime = "application/octet-stream" inside java class mail code? What directory is for the attachment files? Can I put the files in my local directory or must be in database directory?
Thanks in advance
Jeanne