[oracle@BACKUPSERVER ~]$ echo $ORACLE_HOME
/home/oracle/10.2.0/product/db_1
[oracle@BACKUPSERVER ~]$ cd /home/oracle/10.2.0/product/db_1/rdbms/admin/utlmail.sql
-bash: cd: /home/oracle/10.2.0/product/db_1/rdbms/admin/utlmail.sql: Not a directory
[oracle@BACKUPSERVER ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 1 17:01:10 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> @/home/oracle/10.2.0/product/db_1/rdbms/admin/utlmail.sql
Package created.
Synonym created.
SQL> @/home/oracle/10.2.0/product/db_1/rdbms/admin/prvtmail.plb
Package body created.
No errors.
SQL> alter system set smtp_out_server ='127.0.0.1:25' scope=both;
System altered.
Create and Execute the below procedure to test UTL_MAIL:
CREATE OR REPLACE PROCEDURE Sumit_Utl_Mail
AS
subtext VARCHAR(20) DEFAULT 'abc';
BEGIN
Utl_Mail.send(
sender => 'test@gmail.com',
recipients => 'sumit2007tyagi@gmail.com',
cc=>'dba.tyagisumit@gmail.com',
subject => subtext,
mime_type=>'text/html; charset=us-ascii'
);
END;
/
To enable other DB users to use this functionality, grant execute permission on UTL_MAIL package.
eg: grant execute on utl_mail to apps;
/home/oracle/10.2.0/product/db_1
[oracle@BACKUPSERVER ~]$ cd /home/oracle/10.2.0/product/db_1/rdbms/admin/utlmail.sql
-bash: cd: /home/oracle/10.2.0/product/db_1/rdbms/admin/utlmail.sql: Not a directory
[oracle@BACKUPSERVER ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 1 17:01:10 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> @/home/oracle/10.2.0/product/db_1/rdbms/admin/utlmail.sql
Package created.
Synonym created.
SQL> @/home/oracle/10.2.0/product/db_1/rdbms/admin/prvtmail.plb
Package body created.
No errors.
SQL> alter system set smtp_out_server ='127.0.0.1:25' scope=both;
System altered.
Create and Execute the below procedure to test UTL_MAIL:
CREATE OR REPLACE PROCEDURE Sumit_Utl_Mail
AS
subtext VARCHAR(20) DEFAULT 'abc';
BEGIN
Utl_Mail.send(
sender => 'test@gmail.com',
recipients => 'sumit2007tyagi@gmail.com',
cc=>'dba.tyagisumit@gmail.com',
subject => subtext,
mime_type=>'text/html; charset=us-ascii'
);
END;
/
To enable other DB users to use this functionality, grant execute permission on UTL_MAIL package.
eg: grant execute on utl_mail to apps;
No comments:
Post a Comment