ORA-03113:End of cmmunication channel when send mail
- A -Jan 17 2011 — edited Jan 17 2011Hi,
I am using oracle database 9.2.0.8 on windows platform.I want to send pdf file(which is located on local system) in email(attachment) automatically.So that why i build a procedure and schedule in job.When i run this job it send Error
ORA-03113: end-of-file on communication channel
CREATE OR REPLACE PACKAGE SCOTT.SendMailJPkg AS
-- EOL is used to separate text line in the message body
EOL CONSTANT STRING(2) := CHR(13) || CHR(10);
TYPE ATTACHMENTS_LIST IS TABLE OF VARCHAR2(4000);
-- High-level interface with collections
FUNCTION SendMail(SMTPServerName IN STRING,
Sender IN STRING,
Recipient IN STRING,
CcRecipient IN STRING DEFAULT '',
BccRecipient IN STRING DEFAULT '',
Subject IN STRING DEFAULT '',
Body IN STRING DEFAULT '',
ErrorMessage OUT STRING,
Attachments IN ATTACHMENTS_LIST DEFAULT NULL) RETURN NUMBER;
END SendMailJPkg;
CREATE OR REPLACE PROCEDURE SCOTT."PICK_EMAIL_FILES4" AS
ErrorStatus number;
ErrorMessage varchar2(500);
BEGIN
ErrorStatus := SendMailJPkg.SendMail(
SMTPServerName => '192.108.10.2',
Sender => '<riz@pak.com.pk>',
Recipient => 'biz@pak.com.pk',
CcRecipient => 'njava@pak.com.pk',
BccRecipient => 'riz@pak.com.pk',
Subject => 'Summary Reports',
Body => 'Dear Sir,'||chr(10)||chr(10)||'Attached please find the Summary reports.' ,
ErrorMessage => ErrorMessage,
Attachments => SendMailJPkg.ATTACHMENTS_LIST(
'E:\Attach\DAY.pdf',
'E:\Attach\MONTH.pdf'
)
);
END;
Please advice in this regard.
Thanks