Re: How to send email from pl/sql in 806?

2001-05-31 Thread Saurabh Sharma

hi,

the package involved is utl_tcp, i created it under sys. the procedure is
also created without any error under sys.
do i still need to grant execute privilege on it, when sys itself is the
owner.

saurabh
- Original Message -
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Sent: Thursday, May 31, 2001 9:56 PM


> Saurabh;
>   Have you looked at ALL of the packages involved ??  Does the SYS.UTL_TCP
> exist and does the ID using SEND_MAIL have the correct access to it ??  (I
> know these are basic questions, but its usually the basic ones that get us
> first !)
>
> Kevin
>
> -Original Message-
> Sent: Thursday, May 31, 2001 3:21 AM
> To: Multiple recipients of list ORACLE-L
>
>
> hi Jared,
>
> my execution cmd goes like..
> EXECUTE
> SEND_MAIL('[EMAIL PROTECTED]','[EMAIL PROTECTED]','urgent','hello')
>
> it's giving the following error msgs..
> ORA-04068: existing state of packages has been discarded
> ORA-04067: not executed, package body "SYS.UTL_TCP" does not exist
> ORA-06508: PL/SQL: could not find program unit being called
> ORA-06512: at "SYS.SEND_MAIL", line 10
> ORA-06512: at line 2
>
> the package is shown as valid in dba_objects for sys.
>
>
> - Original Message -
> To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> Sent: Thursday, May 31, 2001 12:05 PM
>
>
> >
> > Your procedure is masking the error in the exception block.
> >
> > Comment out the exception block to see the real error.
> >
> > Jared
> >
> > On Wednesday 30 May 2001 22:18, you wrote:
> > > it gives other error msg which are defined in the exception body
inside
> the
> > > procedure.
> > > here it goes..
> > >
> > > EXCEPTION
> > >   when others then
> > >raise_application_error(-2,'Unable to send e-mail message
> from
> > > pl/sql');
> > >
> > > this msg is returned with ora 06512
> > >
> > > any suggestions..
> > > - Original Message -
> > > From: Jared Still <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>; Saurabh Sharma <[EMAIL PROTECTED]>
> > > Sent: Wednesday, May 30, 2001 9:43 PM
> > > Subject: Re: How to send email from pl/sql in 806?
> > >
> > > > On Wednesday 30 May 2001 03:10, Saurabh Sharma wrote:
> > > > > should i give it all four arguments. but it still not executing
> saying
> > > > > ora-06512
> > > >
> > > > There are always other error messages accompanying an ORA-6512.
> > > >
> > > > What are they?
> > > >
> > > > Jared
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author: Jared Still
> >   INET: [EMAIL PROTECTED]
> >
> > Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> > San Diego, California-- Public Internet access / Mailing Lists
> > 
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like subscribing).
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Saurabh Sharma
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California-- Public Internet access / Mailing Lists
> 
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Kevin Lange
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California-- Public Internet access / Mailing Lists
> 
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of &

Re: How to send email from pl/sql in 806?

2001-05-31 Thread Jared Still


As Kevin Lange pointed out, you need the correct access to UTL_TCP.

If you have access to this package through a role, you won't be
able to do this.  You must login as sys and give an explicit grant:

  e.g. grant execute on sys.utl_tcp to scott;

Whe you say that the package is shown as valid in dba_objects
for sys, I assume you are talking about the UTL_TCP package.

That doesn't matter; if you don't have the explicit grant, you can't
create a stored procedure using this package.

Jared



On Thursday 31 May 2001 01:21, Saurabh Sharma wrote:
> hi Jared,
>
> my execution cmd goes like..
> EXECUTE
> SEND_MAIL('[EMAIL PROTECTED]','[EMAIL PROTECTED]','urgent','hello')
>
> it's giving the following error msgs..
> ORA-04068: existing state of packages has been discarded
> ORA-04067: not executed, package body "SYS.UTL_TCP" does not exist
> ORA-06508: PL/SQL: could not find program unit being called
> ORA-06512: at "SYS.SEND_MAIL", line 10
> ORA-06512: at line 2
>
> the package is shown as valid in dba_objects for sys.
>
>
> - Original Message -
> To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> Sent: Thursday, May 31, 2001 12:05 PM
>
> > Your procedure is masking the error in the exception block.
> >
> > Comment out the exception block to see the real error.
> >
> > Jared
> >
> > On Wednesday 30 May 2001 22:18, you wrote:
> > > it gives other error msg which are defined in the exception body inside
>
> the
>
> > > procedure.
> > > here it goes..
> > >
> > > EXCEPTION
> > >   when others then
> > >raise_application_error(-2,'Unable to send e-mail message
>
> from
>
> > > pl/sql');
> > >
> > > this msg is returned with ora 06512
> > >
> > > any suggestions..
> > > - Original Message -
> > > From: Jared Still <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>; Saurabh Sharma <[EMAIL PROTECTED]>
> > > Sent: Wednesday, May 30, 2001 9:43 PM
> > > Subject: Re: How to send email from pl/sql in 806?
> > >
> > > > On Wednesday 30 May 2001 03:10, Saurabh Sharma wrote:
> > > > > should i give it all four arguments. but it still not executing
>
> saying
>
> > > > > ora-06512
> > > >
> > > > There are always other error messages accompanying an ORA-6512.
> > > >
> > > > What are they?
> > > >
> > > > Jared
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author: Jared Still
> >   INET: [EMAIL PROTECTED]
> >
> > Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> > San Diego, California-- Public Internet access / Mailing Lists
> > 
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: How to send email from pl/sql in 806?

2001-05-31 Thread Kevin Lange

Saurabh;
  Have you looked at ALL of the packages involved ??  Does the SYS.UTL_TCP
exist and does the ID using SEND_MAIL have the correct access to it ??  (I
know these are basic questions, but its usually the basic ones that get us
first !)

Kevin

-Original Message-
Sent: Thursday, May 31, 2001 3:21 AM
To: Multiple recipients of list ORACLE-L


hi Jared,

my execution cmd goes like..
EXECUTE
SEND_MAIL('[EMAIL PROTECTED]','[EMAIL PROTECTED]','urgent','hello')

it's giving the following error msgs..
ORA-04068: existing state of packages has been discarded
ORA-04067: not executed, package body "SYS.UTL_TCP" does not exist
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "SYS.SEND_MAIL", line 10
ORA-06512: at line 2

the package is shown as valid in dba_objects for sys.


- Original Message -
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Sent: Thursday, May 31, 2001 12:05 PM


>
> Your procedure is masking the error in the exception block.
>
> Comment out the exception block to see the real error.
>
> Jared
>
> On Wednesday 30 May 2001 22:18, you wrote:
> > it gives other error msg which are defined in the exception body inside
the
> > procedure.
> > here it goes..
> >
> > EXCEPTION
> >   when others then
> >raise_application_error(-2,'Unable to send e-mail message
from
> > pl/sql');
> >
> > this msg is returned with ora 06512
> >
> > any suggestions..
> > - Original Message -
> > From: Jared Still <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; Saurabh Sharma <[EMAIL PROTECTED]>
> > Sent: Wednesday, May 30, 2001 9:43 PM
> > Subject: Re: How to send email from pl/sql in 806?
> >
> > > On Wednesday 30 May 2001 03:10, Saurabh Sharma wrote:
> > > > should i give it all four arguments. but it still not executing
saying
> > > > ora-06512
> > >
> > > There are always other error messages accompanying an ORA-6512.
> > >
> > > What are they?
> > >
> > > Jared
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Jared Still
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California-- Public Internet access / Mailing Lists
> 
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Saurabh Sharma
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Kevin Lange
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: How to send email from pl/sql in 806?

2001-05-31 Thread Saurabh Sharma

hi Jared,

my execution cmd goes like..
EXECUTE
SEND_MAIL('[EMAIL PROTECTED]','[EMAIL PROTECTED]','urgent','hello')

it's giving the following error msgs..
ORA-04068: existing state of packages has been discarded
ORA-04067: not executed, package body "SYS.UTL_TCP" does not exist
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "SYS.SEND_MAIL", line 10
ORA-06512: at line 2

the package is shown as valid in dba_objects for sys.


- Original Message -
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Sent: Thursday, May 31, 2001 12:05 PM


>
> Your procedure is masking the error in the exception block.
>
> Comment out the exception block to see the real error.
>
> Jared
>
> On Wednesday 30 May 2001 22:18, you wrote:
> > it gives other error msg which are defined in the exception body inside
the
> > procedure.
> > here it goes..
> >
> > EXCEPTION
> >   when others then
> >raise_application_error(-2,'Unable to send e-mail message
from
> > pl/sql');
> >
> > this msg is returned with ora 06512
> >
> > any suggestions..
> > - Original Message -
> > From: Jared Still <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; Saurabh Sharma <[EMAIL PROTECTED]>
> > Sent: Wednesday, May 30, 2001 9:43 PM
> > Subject: Re: How to send email from pl/sql in 806?
> >
> > > On Wednesday 30 May 2001 03:10, Saurabh Sharma wrote:
> > > > should i give it all four arguments. but it still not executing
saying
> > > > ora-06512
> > >
> > > There are always other error messages accompanying an ORA-6512.
> > >
> > > What are they?
> > >
> > > Jared
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Jared Still
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California-- Public Internet access / Mailing Lists
> 
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Saurabh Sharma
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: How to send email from pl/sql in 806?

2001-05-30 Thread Jared Still


Your procedure is masking the error in the exception block.

Comment out the exception block to see the real error.

Jared

On Wednesday 30 May 2001 22:18, you wrote:
> it gives other error msg which are defined in the exception body inside the
> procedure.
> here it goes..
>
> EXCEPTION
>   when others then
>raise_application_error(-2,'Unable to send e-mail message from
> pl/sql');
>
> this msg is returned with ora 06512
>
> any suggestions..
> - Original Message -
> From: Jared Still <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; Saurabh Sharma <[EMAIL PROTECTED]>
> Sent: Wednesday, May 30, 2001 9:43 PM
> Subject: Re: How to send email from pl/sql in 806?
>
> > On Wednesday 30 May 2001 03:10, Saurabh Sharma wrote:
> > > should i give it all four arguments. but it still not executing saying
> > > ora-06512
> >
> > There are always other error messages accompanying an ORA-6512.
> >
> > What are they?
> >
> > Jared
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: How to send email from pl/sql in 806?

2001-05-30 Thread Jared Still

On Wednesday 30 May 2001 03:10, Saurabh Sharma wrote:
>
> should i give it all four arguments. but it still not executing saying
> ora-06512

There are always other error messages accompanying an ORA-6512.

What are they?

Jared
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: How to send email from pl/sql in 806?

2001-05-30 Thread Saurabh Sharma
>RETURN RAW;
>   FUNCTION get_text(cIN OUT NOCOPY connection,
> len  INPLS_INTEGER DEFAULT 1,
> peek INBOOLEAN DEFAULT FALSE)
> RETURN VARCHAR2;
>   FUNCTION get_line(c   IN OUT NOCOPY connection,
> remove_crlf INBOOLEAN DEFAULT false,
> peekINBOOLEAN DEFAULT FALSE)
> RETURN VARCHAR2;
>
>   /**
>* Transmits all the output data in the output queue to the connection
>* immediately.
>*
>* PARAMETERS
>*   c   TCP/IP connection
>* RETURN
>*   None.
>* EXCEPTIONS
>*   network_error  - network error
>*/
>   PROCEDURE flush(c IN OUT NOCOPY connection);
>
>   /**
>* Closes a TCP/IP connection.  After the connection is closed, all the
>* in the connection will be set to NULL.
>*
>* PARAMETERS
>*   cTCP/IP connection
>* RETURN
>*   None.
>* EXCEPTIONS
>*   network_error  - network error
>*/
>   PROCEDURE close_connection(c IN OUT NOCOPY connection);
>
>   /**
>* Closes all open TCP/IP connections.
>*
>* PARAMETERS
>*   None
>* RETURN
>*   None
>* EXCEPTIONS
>*   None
>*/
>   PROCEDURE close_all_connections;
>
> END;
> /
>
> GRANT EXECUTE ON sys.utl_tcp TO PUBLIC;
> DROP PUBLIC SYNONYM utl_tcp;
> CREATE PUBLIC SYNONYM utl_tcp FOR sys.utl_tcp;
>
>
> --

----------------
------
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "Saurabh
> Sharma"  To: Multiple recipients of
list ORACLE-L <[EMAIL PROTECTED]>
>  td.com>  Subject: Re: How to send
email from pl/sql in 806?
> Sent by:
> [EMAIL PROTECTED]
> om
>
>
> 05/25/2001
> 08:20 PM
> Please respond
> to ORACLE-L
>
>
>
>
>
> hi,
> i've oracle 8.1.5 on NT. but could'nt find the utltcp.sql , infact it had
> the procedure utl_http
> could it help?
>
> - Original Message -
> To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> Sent: Friday, May 25, 2001 1:56 PM
>
>
> > hi sharma
> > The builtin packages UTL_SMTP and UTL_TCP are available with oracle
8.1.5
> > onwards , thats the reason you were getting compilation errors.
> > Ramana
> >
> >
> > > --
> > > From: Saurabh Sharma[SMTP:[EMAIL PROTECTED]]
> > > Reply To: [EMAIL PROTECTED]
> > > Sent: Friday, May 25, 2001 12:40 PM
> > > To: Multiple recipients of list ORACLE-L
> > > Subject: Re: How to send email from pl/sql in 806?
> > >
> > > HI,
> > >  i tried creating this procedure. but it results into compilation
> errors.
> > > says..
> > > utl_tcp.connection must be declared, and so does for
> > > utl_tcp.get_line and
> > > utl_tcp.write_line
> > >
> > > how do we fefine them. where is this package utl_tcp
> > >
> > > pls explore.
> > >
> > > thanks.
> > > - Original Message -
> > > To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> > > Sent: Wednesday, May 23, 2001 11:05 AM
> > >
> > >
> > > >
> > > > try this procedure it works  just replace the IP address in the line
> > > > c := utl_tcp.open_connection('192.168.1.1', 25);
> > > > with the IP address of u'r mail server
> > > >
> > > > regards
> > > > __
> > > > Omar Khalid
> > > > Software Engineer
> > > > LMKResources
> > > > A LANDMARK AFFILIATE
> > > > (Formerly Mathtech Pakistan Pvt. Ltd)
> > > > 18, F-8/3, Main Margalla Road,
> > > > Islamabad, Pakistan
> > > > Voice: 111-101-101*780
> > > > Fax: 92-051-2255989
> > > > Email: [EMAIL PROTECTED]
> > > > Web: www.lmkr.com
> > > >
> > > >
> > > >
> > > >
> >

RE: How to send email from pl/sql in 806?

2001-05-29 Thread Venkata Ramana Kanchinadam



 <<...>> 
Venkata Ramana
Sierra Optima Limited,
SVR Towers, 8-2-1/B/1, Panjagutta,
Hyderabad 500082, India.
Ph: (91-40) - 3730321, 3746122, 3745051 Ext: 228,219
Fax:(91-40) - 3746419.
Email : [EMAIL PROTECTED]


> --
> From: Venkata Ramana Kanchinadam
> Reply To: [EMAIL PROTECTED]
> Sent: Friday, May 25, 2001 1:56 PM
> To:   Multiple recipients of list ORACLE-L
> Subject:      RE: How to send email from pl/sql in 806?
> 
> hi sharma
> The builtin packages UTL_SMTP and UTL_TCP are available with oracle 8.1.5
> onwards , thats the reason you were getting compilation errors.
> Ramana
> 
> 
> > --
> > From:   Saurabh Sharma[SMTP:[EMAIL PROTECTED]]
> > Reply To:   [EMAIL PROTECTED]
> > Sent:   Friday, May 25, 2001 12:40 PM
> > To:     Multiple recipients of list ORACLE-L
> > Subject:Re: How to send email from pl/sql in 806?
> > 
> > HI,
> >  i tried creating this procedure. but it results into compilation
> errors.
> > says..
> > utl_tcp.connection must be declared, and so does for
> > utl_tcp.get_line and
> > utl_tcp.write_line
> > 
> > how do we fefine them. where is this package utl_tcp
> > 
> > pls explore.
> > 
> > thanks.
> > - Original Message -
> > To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> > Sent: Wednesday, May 23, 2001 11:05 AM
> > 
> > 
> > >
> > > try this procedure it works  just replace the IP address in the line
> > > c := utl_tcp.open_connection('192.168.1.1', 25);
> > > with the IP address of u'r mail server
> > >
> > > regards
> > > __
> > > Omar Khalid
> > > Software Engineer
> > > LMKResources
> > > A LANDMARK AFFILIATE
> > > (Formerly Mathtech Pakistan Pvt. Ltd)
> > > 18, F-8/3, Main Margalla Road,
> > > Islamabad, Pakistan
> > > Voice: 111-101-101*780
> > > Fax: 92-051-2255989
> > > Email: [EMAIL PROTECTED]
> > > Web: www.lmkr.com
> > >
> > >
> > >
> > >
> > rem
> > ---
> > > rem Filename:   smtp.sql
> > > rem Purpose:Send e-mail messages from PL/SQL
> > > rem Notes:  From Oracle8i release 8.1.6 one can send e-mail
> messages
> > > rem   directly from PL/SQL using either the UTL_TCP or UTL_SMTP
> > > rem   packages. No pipes or external procedures required.
> > > rem Date:   27-Mar-2000
> > > rem Author: Frank Naude ([EMAIL PROTECTED])
> > >
> > rem
> > ---
> > >
> > > CREATE OR REPLACE PROCEDURE SEND_MAIL (
> > >   msg_fromvarchar2 := 'oracle',
> > >   msg_to  varchar2,
> > >   msg_subject varchar2 := 'E-Mail message from your database',
> > >   msg_textvarchar2 := '' )
> > > IS
> > >   c  utl_tcp.connection;
> > >   rc integer;
> > > BEGIN
> > >   c := utl_tcp.open_connection('192.168.1.1', 25);   -- open the
> > SMTP
> > > port 25 on local machine
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'HELO 192.168.1.1');
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'MAIL FROM: '||msg_from);
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'RCPT TO: '||msg_to);
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'DATA'); -- Start
> message
> > > body
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'Subject: '||msg_subject);
> > >   rc := utl_tcp.write_line(c, '');
> > >   rc := utl_tcp.write_line(c, msg_text);
> > >   rc := utl_tcp.write_line(c, '.');-- End of
> message
> > > body
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'QUIT');
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   utl_tcp.close_connection(c); -- Close the
> > > connection
> > > EXCEPTION
> > >   when others then
> > >raise_applic

Re: How to send email from pl/sql in 806?

2001-05-25 Thread OKhalid
YNONYM utl_tcp FOR sys.utl_tcp;















   

   

   



   
   
   
   
   
   


   

"Saurabh   

Sharma"  To: Multiple recipients of list ORACLE-L 
<[EMAIL PROTECTED]>   
                  Subject: Re: How to send email from 
pl/sql in 806?
Sent by:   

[EMAIL PROTECTED] 

om 

   

   

05/25/2001 

08:20 PM   

Please respond 

to ORACLE-L

   

   




hi,
i've oracle 8.1.5 on NT. but could'nt find the utltcp.sql , infact it had
the procedure utl_http
could it help?

- Original Message -
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2001 1:56 PM


> hi sharma
> The builtin packages UTL_SMTP and UTL_TCP are available with oracle 8.1.5
> onwards , thats the reason you were getting compilation errors.
> Ramana
>
>
> > --
> > From: Saurabh Sharma[SMTP:[EMAIL PROTECTED]]
> > Reply To: [EMAIL PROTECTED]
> > Sent: Friday, May 25, 2001 12:40 PM
> > To: Multiple recipients of list ORACLE-L
> > Subject: Re: How to send email from pl/sql in 806?
> >
> > HI,
> >  i tried creating this procedure. but it results into compilation
errors.
> > says..
> > utl_tcp.connection must be declared, and so does for
> > utl_tcp.get_line and
> > utl_tcp.write_line
> >
> > how do we fefine them. where is this package utl_tcp
> >
> > pls explore.
> >
> > thanks.
> > - Original Message -
> > To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> > Sent: Wednesday, May 23, 2001 11:05 AM
> >
> >
> > >
> > > try this procedure it works  just replace the IP address in the line
> > > c := utl_tcp.open_connection('192.168.1.1', 25);
> > > with the IP address of u'r mail server
> > >
> > > regards
> > > __
> > > Omar Khalid
> > > Software Engineer
> > > LMKResources
> > > A LANDMARK AFFILIATE
> > > (Formerly Mathtech Pakistan Pvt. Ltd)
> > > 18, F-8/3, Main Margalla Road,
> > > Islamabad, Pakistan
> > > Voice: 111-101-101*780
> > > Fax: 92-051-2255989
> > > Email: [EMAIL PROTECTED]
> > > Web: www.lmkr.com
> > >
> > >
> > >
> > >
> > rem
> > ---
> > > rem Filename:   smtp.sql
> > > rem Purpose:Send e-mail messages from PL/SQL
> > > rem Notes:  From Oracle8i release 8.1.6 one can send e-mail
messages
> > > rem   directly from PL/SQL using either the UTL_TCP or UTL_SMTP
> > > rem   packages. No pipes or external procedures required.
> > > rem Date:   27-Mar-2000
> > > rem Author: Frank Naude ([EMAIL PROTECTED])
> > >
> > rem
> > ---
> > >
> > > CREATE OR REPLACE PROCEDURE SEND_MAIL (
> > >   msg_fromvarchar2 := 'oracle',
> > >   msg_to  varchar2,
> > >   msg_subject varchar2 := 'E-Mail message from your database',
> > >   msg_textvarchar2 := '' )
> > > IS
> > >   c  utl_tcp.connection;

Re: How to send email from pl/sql in 806?

2001-05-25 Thread Saurabh Sharma

hi,
i've oracle 8.1.5 on NT. but could'nt find the utltcp.sql , infact it had
the procedure utl_http
could it help?

- Original Message -
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2001 1:56 PM


> hi sharma
> The builtin packages UTL_SMTP and UTL_TCP are available with oracle 8.1.5
> onwards , thats the reason you were getting compilation errors.
> Ramana
>
>
> > --
> > From: Saurabh Sharma[SMTP:[EMAIL PROTECTED]]
> > Reply To: [EMAIL PROTECTED]
> > Sent: Friday, May 25, 2001 12:40 PM
> > To: Multiple recipients of list ORACLE-L
> > Subject: Re: How to send email from pl/sql in 806?
> >
> > HI,
> >  i tried creating this procedure. but it results into compilation
errors.
> > says..
> > utl_tcp.connection must be declared, and so does for
> > utl_tcp.get_line and
> > utl_tcp.write_line
> >
> > how do we fefine them. where is this package utl_tcp
> >
> > pls explore.
> >
> > thanks.
> > - Original Message -
> > To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> > Sent: Wednesday, May 23, 2001 11:05 AM
> >
> >
> > >
> > > try this procedure it works  just replace the IP address in the line
> > > c := utl_tcp.open_connection('192.168.1.1', 25);
> > > with the IP address of u'r mail server
> > >
> > > regards
> > > __
> > > Omar Khalid
> > > Software Engineer
> > > LMKResources
> > > A LANDMARK AFFILIATE
> > > (Formerly Mathtech Pakistan Pvt. Ltd)
> > > 18, F-8/3, Main Margalla Road,
> > > Islamabad, Pakistan
> > > Voice: 111-101-101*780
> > > Fax: 92-051-2255989
> > > Email: [EMAIL PROTECTED]
> > > Web: www.lmkr.com
> > >
> > >
> > >
> > >
> > rem
> > ---
> > > rem Filename:   smtp.sql
> > > rem Purpose:Send e-mail messages from PL/SQL
> > > rem Notes:  From Oracle8i release 8.1.6 one can send e-mail
messages
> > > rem   directly from PL/SQL using either the UTL_TCP or UTL_SMTP
> > > rem   packages. No pipes or external procedures required.
> > > rem Date:   27-Mar-2000
> > > rem Author: Frank Naude ([EMAIL PROTECTED])
> > >
> > rem
> > ---
> > >
> > > CREATE OR REPLACE PROCEDURE SEND_MAIL (
> > >   msg_fromvarchar2 := 'oracle',
> > >   msg_to  varchar2,
> > >   msg_subject varchar2 := 'E-Mail message from your database',
> > >   msg_textvarchar2 := '' )
> > > IS
> > >   c  utl_tcp.connection;
> > >   rc integer;
> > > BEGIN
> > >   c := utl_tcp.open_connection('192.168.1.1', 25);   -- open the
> > SMTP
> > > port 25 on local machine
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'HELO 192.168.1.1');
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'MAIL FROM: '||msg_from);
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'RCPT TO: '||msg_to);
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'DATA'); -- Start
message
> > > body
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'Subject: '||msg_subject);
> > >   rc := utl_tcp.write_line(c, '');
> > >   rc := utl_tcp.write_line(c, msg_text);
> > >   rc := utl_tcp.write_line(c, '.');-- End of
message
> > > body
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   rc := utl_tcp.write_line(c, 'QUIT');
> > >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> > >   utl_tcp.close_connection(c); -- Close the
> > > connection
> > > EXCEPTION
> > >   when others then
> > >raise_application_error(-2,'Unable to send e-mail message
> > from
> > > pl/sql');
> > > END;
> > > /
> > > show errors
> > >
> > > --  Examples:
> > > set serveroutput on
> > >
> > > exec send_mail(msg_to

RE: How to send email from pl/sql in 806?

2001-05-25 Thread Venkata Ramana Kanchinadam

hi sharma
The builtin packages UTL_SMTP and UTL_TCP are available with oracle 8.1.5
onwards , thats the reason you were getting compilation errors.
Ramana


> --
> From: Saurabh Sharma[SMTP:[EMAIL PROTECTED]]
> Reply To: [EMAIL PROTECTED]
> Sent: Friday, May 25, 2001 12:40 PM
> To:   Multiple recipients of list ORACLE-L
> Subject:      Re: How to send email from pl/sql in 806?
> 
> HI,
>  i tried creating this procedure. but it results into compilation errors.
> says..
> utl_tcp.connection must be declared, and so does for
> utl_tcp.get_line and
> utl_tcp.write_line
> 
> how do we fefine them. where is this package utl_tcp
> 
> pls explore.
> 
> thanks.
> - Original Message -
> To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> Sent: Wednesday, May 23, 2001 11:05 AM
> 
> 
> >
> > try this procedure it works  just replace the IP address in the line
> > c := utl_tcp.open_connection('192.168.1.1', 25);
> > with the IP address of u'r mail server
> >
> > regards
> > __
> > Omar Khalid
> > Software Engineer
> > LMKResources
> > A LANDMARK AFFILIATE
> > (Formerly Mathtech Pakistan Pvt. Ltd)
> > 18, F-8/3, Main Margalla Road,
> > Islamabad, Pakistan
> > Voice: 111-101-101*780
> > Fax: 92-051-2255989
> > Email: [EMAIL PROTECTED]
> > Web: www.lmkr.com
> >
> >
> >
> >
> rem
> ---
> > rem Filename:   smtp.sql
> > rem Purpose:Send e-mail messages from PL/SQL
> > rem Notes:  From Oracle8i release 8.1.6 one can send e-mail messages
> > rem   directly from PL/SQL using either the UTL_TCP or UTL_SMTP
> > rem   packages. No pipes or external procedures required.
> > rem Date:   27-Mar-2000
> > rem Author: Frank Naude ([EMAIL PROTECTED])
> >
> rem
> ---
> >
> > CREATE OR REPLACE PROCEDURE SEND_MAIL (
> >   msg_fromvarchar2 := 'oracle',
> >   msg_to  varchar2,
> >   msg_subject varchar2 := 'E-Mail message from your database',
> >   msg_textvarchar2 := '' )
> > IS
> >   c  utl_tcp.connection;
> >   rc integer;
> > BEGIN
> >   c := utl_tcp.open_connection('192.168.1.1', 25);   -- open the
> SMTP
> > port 25 on local machine
> >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> >   rc := utl_tcp.write_line(c, 'HELO 192.168.1.1');
> >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> >   rc := utl_tcp.write_line(c, 'MAIL FROM: '||msg_from);
> >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> >   rc := utl_tcp.write_line(c, 'RCPT TO: '||msg_to);
> >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> >   rc := utl_tcp.write_line(c, 'DATA'); -- Start message
> > body
> >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> >   rc := utl_tcp.write_line(c, 'Subject: '||msg_subject);
> >   rc := utl_tcp.write_line(c, '');
> >   rc := utl_tcp.write_line(c, msg_text);
> >   rc := utl_tcp.write_line(c, '.');-- End of message
> > body
> >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> >   rc := utl_tcp.write_line(c, 'QUIT');
> >   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
> >   utl_tcp.close_connection(c); -- Close the
> > connection
> > EXCEPTION
> >   when others then
> >raise_application_error(-2,'Unable to send e-mail message
> from
> > pl/sql');
> > END;
> > /
> > show errors
> >
> > --  Examples:
> > set serveroutput on
> >
> > exec send_mail(msg_to  =>'Omar Khalid/IT/LotusCert/Pk');
> > exec send_mail(msg_to  =>'[EMAIL PROTECTED]');
> >
> > exec send_mail(msg_to  =>'[EMAIL PROTECTED]',
> > msg_text=>'Look Ma I can send mail from plsql');
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> 
> > Oracle DBA
> >  list ORACLE-L <[EMAIL PROTECTED]>
> > o.com>   cc:
> > Sent by: Subject: How to send email
> from pl/sql in 806?
> > [EMAIL PROTECTED]

Re: How to send email from pl/sql in 806?

2001-05-25 Thread Paul Drake

Saurabh Sharma wrote:
> 
> HI,
>  i tried creating this procedure. but it results into compilation errors.
> says..
> utl_tcp.connection must be declared, and so does for
> utl_tcp.get_line and
> utl_tcp.write_line
> 
> how do we fefine them. where is this package utl_tcp
> 
> pls explore.
> 
> thanks.

Simple.
Its in %ORACLE_BASE%\Ora81\rdbms\admin\  
 where you're find utltcp.sql and utlsmtp.sql, and lots of other
goodies.
It would not be included with an Oracle 8.0.x distribution.
8.1.6 goes off support 31-OCT-2001 - go straight to 8.1.7.1.x.

Paul


> - Original Message -
> To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> Sent: Wednesday, May 23, 2001 11:05 AM
> 
> >
> > try this procedure it works  just replace the IP address in the line
> > c := utl_tcp.open_connection('192.168.1.1', 25);
> > with the IP address of u'r mail server
> >
> > regards
> > __
> > Omar Khalid
> > Software Engineer
> > LMKResources
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Paul Drake
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: How to send email from pl/sql in 806?

2001-05-24 Thread Saurabh Sharma

HI,
 i tried creating this procedure. but it results into compilation errors.
says..
utl_tcp.connection must be declared, and so does for
utl_tcp.get_line and
utl_tcp.write_line

how do we fefine them. where is this package utl_tcp

pls explore.

thanks.
- Original Message -
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 11:05 AM


>
> try this procedure it works  just replace the IP address in the line
> c := utl_tcp.open_connection('192.168.1.1', 25);
> with the IP address of u'r mail server
>
> regards
> __
> Omar Khalid
> Software Engineer
> LMKResources
> A LANDMARK AFFILIATE
> (Formerly Mathtech Pakistan Pvt. Ltd)
> 18, F-8/3, Main Margalla Road,
> Islamabad, Pakistan
> Voice: 111-101-101*780
> Fax: 92-051-2255989
> Email: [EMAIL PROTECTED]
> Web: www.lmkr.com
>
>
>
>
rem ---
> rem Filename:   smtp.sql
> rem Purpose:Send e-mail messages from PL/SQL
> rem Notes:  From Oracle8i release 8.1.6 one can send e-mail messages
> rem   directly from PL/SQL using either the UTL_TCP or UTL_SMTP
> rem   packages. No pipes or external procedures required.
> rem Date:   27-Mar-2000
> rem Author: Frank Naude ([EMAIL PROTECTED])
>
rem ---
>
> CREATE OR REPLACE PROCEDURE SEND_MAIL (
>   msg_fromvarchar2 := 'oracle',
>   msg_to  varchar2,
>   msg_subject varchar2 := 'E-Mail message from your database',
>   msg_textvarchar2 := '' )
> IS
>   c  utl_tcp.connection;
>   rc integer;
> BEGIN
>   c := utl_tcp.open_connection('192.168.1.1', 25);   -- open the SMTP
> port 25 on local machine
>   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
>   rc := utl_tcp.write_line(c, 'HELO 192.168.1.1');
>   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
>   rc := utl_tcp.write_line(c, 'MAIL FROM: '||msg_from);
>   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
>   rc := utl_tcp.write_line(c, 'RCPT TO: '||msg_to);
>   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
>   rc := utl_tcp.write_line(c, 'DATA'); -- Start message
> body
>   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
>   rc := utl_tcp.write_line(c, 'Subject: '||msg_subject);
>   rc := utl_tcp.write_line(c, '');
>   rc := utl_tcp.write_line(c, msg_text);
>   rc := utl_tcp.write_line(c, '.');-- End of message
> body
>   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
>   rc := utl_tcp.write_line(c, 'QUIT');
>   dbms_output.put_line(utl_tcp.get_line(c, TRUE));
>   utl_tcp.close_connection(c); -- Close the
> connection
> EXCEPTION
>   when others then
>raise_application_error(-2,'Unable to send e-mail message from
> pl/sql');
> END;
> /
> show errors
>
> --  Examples:
> set serveroutput on
>
> exec send_mail(msg_to  =>'Omar Khalid/IT/LotusCert/Pk');
> exec send_mail(msg_to  =>'[EMAIL PROTECTED]');
>
> exec send_mail(msg_to  =>'[EMAIL PROTECTED]',
> msg_text=>'Look Ma I can send mail from plsql');
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

> Oracle DBA
> 
> o.com>   cc:
> Sent by: Subject: How to send email
from pl/sql in 806?
> [EMAIL PROTECTED]
> om
>
>
> 05/23/2001
> 11:35 AM
> Please respond
> to ORACLE-L
>
>
>
>
>
> Hi,
>
> I am aware that 817 supports UTL_SMTP for this same
> functionality.  But how can one send email from pl/sql
> in 806?
>
>
> thanx
>
> =
> Vicky D. Foster,
> Senior Oracle DBA:
> email:  [EMAIL PROTECTED]
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Oracle DBA
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California-- Public Internet access / Mailing Lists
> 
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAI

Re: How to send email from pl/sql in 806?

2001-05-22 Thread Jared Still


A robust implementation of this would require a ProC or
Java external routine.

A search of the web would probably turn up some likely candidates.

Jared

On Tuesday 22 May 2001 20:35, Oracle DBA wrote:
> Hi,
>
> I am aware that 817 supports UTL_SMTP for this same
> functionality.  But how can one send email from pl/sql
> in 806?
>
>
> thanx
>
> =
> Vicky D. Foster,
> Senior Oracle DBA:
> email:  [EMAIL PROTECTED]
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: How to send email from pl/sql in 806?

2001-05-22 Thread OKhalid


try this procedure it works  just replace the IP address in the line
c := utl_tcp.open_connection('192.168.1.1', 25);
with the IP address of u'r mail server

regards
__
Omar Khalid
Software Engineer
LMKResources
A LANDMARK AFFILIATE
(Formerly Mathtech Pakistan Pvt. Ltd)
18, F-8/3, Main Margalla Road,
Islamabad, Pakistan
Voice: 111-101-101*780
Fax: 92-051-2255989
Email: [EMAIL PROTECTED]
Web: www.lmkr.com



rem ---
rem Filename:   smtp.sql
rem Purpose:Send e-mail messages from PL/SQL
rem Notes:  From Oracle8i release 8.1.6 one can send e-mail messages
rem   directly from PL/SQL using either the UTL_TCP or UTL_SMTP
rem   packages. No pipes or external procedures required.
rem Date:   27-Mar-2000
rem Author: Frank Naude ([EMAIL PROTECTED])
rem ---

CREATE OR REPLACE PROCEDURE SEND_MAIL (
  msg_fromvarchar2 := 'oracle',
  msg_to  varchar2,
  msg_subject varchar2 := 'E-Mail message from your database',
  msg_textvarchar2 := '' )
IS
  c  utl_tcp.connection;
  rc integer;
BEGIN
  c := utl_tcp.open_connection('192.168.1.1', 25);   -- open the SMTP
port 25 on local machine
  dbms_output.put_line(utl_tcp.get_line(c, TRUE));
  rc := utl_tcp.write_line(c, 'HELO 192.168.1.1');
  dbms_output.put_line(utl_tcp.get_line(c, TRUE));
  rc := utl_tcp.write_line(c, 'MAIL FROM: '||msg_from);
  dbms_output.put_line(utl_tcp.get_line(c, TRUE));
  rc := utl_tcp.write_line(c, 'RCPT TO: '||msg_to);
  dbms_output.put_line(utl_tcp.get_line(c, TRUE));
  rc := utl_tcp.write_line(c, 'DATA'); -- Start message
body
  dbms_output.put_line(utl_tcp.get_line(c, TRUE));
  rc := utl_tcp.write_line(c, 'Subject: '||msg_subject);
  rc := utl_tcp.write_line(c, '');
  rc := utl_tcp.write_line(c, msg_text);
  rc := utl_tcp.write_line(c, '.');-- End of message
body
  dbms_output.put_line(utl_tcp.get_line(c, TRUE));
  rc := utl_tcp.write_line(c, 'QUIT');
  dbms_output.put_line(utl_tcp.get_line(c, TRUE));
  utl_tcp.close_connection(c); -- Close the
connection
EXCEPTION
  when others then
   raise_application_error(-2,'Unable to send e-mail message from
pl/sql');
END;
/
show errors

--  Examples:
set serveroutput on

exec send_mail(msg_to  =>'Omar Khalid/IT/LotusCert/Pk');
exec send_mail(msg_to  =>'[EMAIL PROTECTED]');

exec send_mail(msg_to  =>'[EMAIL PROTECTED]',
msg_text=>'Look Ma I can send mail from plsql');




   

   

   



   
   
   
   
   
   


   

Oracle DBA 

               
            o.com>   cc:   

Sent by: Subject: How to send email from pl/sql in 
806?
[EMAIL PROTECTED] 

om 

   

   

05/23/2001 

11:35 AM   

Please respond 

to ORACLE-L

   


How to send email from pl/sql in 806?

2001-05-22 Thread Oracle DBA

Hi,

I am aware that 817 supports UTL_SMTP for this same
functionality.  But how can one send email from pl/sql
in 806?


thanx

=
Vicky D. Foster, 
Senior Oracle DBA: 
email:  [EMAIL PROTECTED]

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Oracle DBA
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).