Send mail from PL/SQL

2002-04-19 Thread Roland . Skoldblom

Hallo,

anyone whom can help me. I would like this code to send email to two recipients, what 
is missing?
Thanks for all help I can get.

PROCEDURE   sendmailtestny2(
   inRecipient1 IN VARCHAR2,
 inRecipient2 in VARCHAR2,
   inSubject IN VARCHAR2,
   inMessage IN VARCHAR2,
   inSender IN VARCHAR2 := '[EMAIL PROTECTED]' )
IS
   crlf VARCHAR2(2) := CHR(13)||CHR(10);
   mailhostVARCHAR2(30) := 'asolc78.ica.se';
   mail_conn  utl_smtp.connection;
   lMessage1 VARCHAR2(200);
   lmessage2 VARCHAR2(200);
BEGIN

   lMessage1 := 'From:' || inSender || crlf ||
   'Subject:' || inSubject || crlf ||
   'To:' || inRecipient1 || crlf || '' || crlf ||
  inrecipient2 || crlf || '' || crlf ||
 inMessage || crlf || crlf || '/' || inSender;

 --lMessage2 := 'From:' || inSender || crlf ||
  -- 'Subject:' || inSubject || crlf ||
--   'To:' || inRecipient2 || crlf || '' || crlf ||
  -- inMessage || crlf || crlf || '/' || inSender;

   mail_conn := utl_smtp.open_connection(mailhost, 25);
   utl_smtp.helo(mail_conn, mailhost);
   utl_smtp.mail(mail_conn, inSender);
   utl_smtp.rcpt(mail_conn, inRecipient1);
   utl_smtp.rcpt(mail_conn, inRecipient2);
   utl_smtp.data(mail_conn, lMessage1);
   utl_smtp.data(mail_conn, lMessage2);
   utl_smtp.quit(mail_conn);

END;


Roland

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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: Send mail from PL/SQL

2002-04-19 Thread Abdul Aleem

In Outlook, when I put two addresses in TO or CC or BCC fields, they are
separated by a semi-colon(;). It appears that your code is placing carriage
return. I do not know if the code will understand this semi-colon as command
terminator. Otherwise you might want to use the CC or BCC fields for the
second recipient.

HTH!

Aleem


 -Original Message-
Sent:   Friday, April 19, 2002 4:28 PM
To: Multiple recipients of list ORACLE-L
Subject:Send mail from PL/SQL

Hallo,

anyone whom can help me. I would like this code to send email to two
recipients, what is missing?
Thanks for all help I can get.

PROCEDURE   sendmailtestny2(
   inRecipient1 IN VARCHAR2,
 inRecipient2 in VARCHAR2,
   inSubject IN VARCHAR2,
   inMessage IN VARCHAR2,
   inSender IN VARCHAR2 := '[EMAIL PROTECTED]'
)
IS
   crlf VARCHAR2(2) := CHR(13)||CHR(10);
   mailhostVARCHAR2(30) := 'asolc78.ica.se';
   mail_conn  utl_smtp.connection;
   lMessage1 VARCHAR2(200);
   lmessage2 VARCHAR2(200);
BEGIN

   lMessage1 := 'From:' || inSender || crlf ||
   'Subject:' || inSubject || crlf ||
   'To:' || inRecipient1 || crlf || '' || crlf ||
  inrecipient2 || crlf || '' || crlf ||
 inMessage || crlf || crlf || '/' ||
inSender;

 --lMessage2 := 'From:' || inSender || crlf ||
  -- 'Subject:' || inSubject || crlf ||
--   'To:' || inRecipient2 || crlf || '' || crlf ||
  -- inMessage || crlf || crlf || '/' || inSender;

   mail_conn := utl_smtp.open_connection(mailhost, 25);
   utl_smtp.helo(mail_conn, mailhost);
   utl_smtp.mail(mail_conn, inSender);
   utl_smtp.rcpt(mail_conn, inRecipient1);
   utl_smtp.rcpt(mail_conn, inRecipient2);
   utl_smtp.data(mail_conn, lMessage1);
   utl_smtp.data(mail_conn, lMessage2);
   utl_smtp.quit(mail_conn);

END;


Roland

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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: Abdul Aleem
  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).



Ang: RE: Send mail from PL/SQL

2002-04-19 Thread Roland . Skoldblom


it helped with CC:

Thanks

/Roland




Abdul Aleem [EMAIL PROTECTED]@fatcity.com den 2002-04-19 03:48 PST

Sänd svar till [EMAIL PROTECTED]

Sänt av:  [EMAIL PROTECTED]


Till: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Kopia:

In Outlook, when I put two addresses in TO or CC or BCC fields, they are
separated by a semi-colon(;). It appears that your code is placing carriage
return. I do not know if the code will understand this semi-colon as command
terminator. Otherwise you might want to use the CC or BCC fields for the
second recipient.

HTH!

Aleem


 -Original Message-
Sent:   Friday, April 19, 2002 4:28 PM
To:Multiple recipients of list ORACLE-L

Hallo,

anyone whom can help me. I would like this code to send email to two
recipients, what is missing?
Thanks for all help I can get.

PROCEDURE   sendmailtestny2(
   inRecipient1 IN VARCHAR2,
 inRecipient2 in VARCHAR2,
   inSubject IN VARCHAR2,
   inMessage IN VARCHAR2,
   inSender IN VARCHAR2 := '[EMAIL PROTECTED]'
)
IS
   crlf VARCHAR2(2) := CHR(13)||CHR(10);
   mailhostVARCHAR2(30) := 'asolc78.ica.se';
   mail_conn  utl_smtp.connection;
   lMessage1 VARCHAR2(200);
   lmessage2 VARCHAR2(200);
BEGIN

   lMessage1 := 'From:' || inSender || crlf ||
   'Subject:' || inSubject || crlf ||
   'To:' || inRecipient1 || crlf || '' || crlf ||
  inrecipient2 || crlf || '' || crlf ||
 inMessage || crlf || crlf || '/' ||
inSender;

 --lMessage2 := 'From:' || inSender || crlf ||
  -- 'Subject:' || inSubject || crlf ||
--   'To:' || inRecipient2 || crlf || '' || crlf ||
  -- inMessage || crlf || crlf || '/' || inSender;

   mail_conn := utl_smtp.open_connection(mailhost, 25);
   utl_smtp.helo(mail_conn, mailhost);
   utl_smtp.mail(mail_conn, inSender);
   utl_smtp.rcpt(mail_conn, inRecipient1);
   utl_smtp.rcpt(mail_conn, inRecipient2);
   utl_smtp.data(mail_conn, lMessage1);
   utl_smtp.data(mail_conn, lMessage2);
   utl_smtp.quit(mail_conn);

END;


Roland

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  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: Abdul Aleem
  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:
  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: Send mail from pl/sql

2002-04-08 Thread Jesse, Rich

Ahh...the files on the link are for Forms sending from a Windows client via
DDE (in which case the e-mail client matters), and not thru PL/SQL (in which
case the e-mail client doesn't matter), like the original question stated.
That's why I was confused.

Thx!

Rich Jesse   System/Database Administrator
[EMAIL PROTECTED]  Quad/Tech International, Sussex, WI USA


 -Original Message-
 From: Abdul Aleem [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, April 06, 2002 3:53 AM
 To: Multiple recipients of list ORACLE-L
 Subject: RE: Send mail from pl/sql
 
 
 The client's importance is because the site I mentioned 
 perhaps has forms
 for two types of e-mail clients.
 I did sent you a procedure/function using UTL_SMTP with the 
 e-mail address
 of original sender. 
 
 Peter Koltez's site address is:
 http://ourworld.compuserve.com/homepages/peter_koletzke/tip.ht
 m#formstips1
 
 HTH!
 
 Aleem
 
 
  -Original Message-
 Sent: Friday, April 05, 2002 8:33 PM
 To:   Multiple recipients of list ORACLE-L
 Subject:  RE: Send mail from pl/sql
 
 Two questions:
 
   1) Why should the client matter?
   2) What is the web address of the site you mention?
 
 TIA!
 
 Rich Jesse   System/Database Administrator
 [EMAIL PROTECTED]  Quad/Tech International, 
 Sussex, WI USA
 
 
  -Original Message-
  From: Abdul Aleem [mailto:[EMAIL PROTECTED]]
  Sent: Friday, April 05, 2002 3:18 AM
  To: Multiple recipients of list ORACLE-L
  Subject: RE: Send mail from pl/sql
  
  
  Which mail client are you looking it for. If it is for MS 
  outlook, you can
  check at Perter Koltez's site
  
  Aleem
  
   -Original Message-
  Sent:   Friday, April 05, 2002 12:33 PM
  To: Multiple recipients of list ORACLE-L
  Subject:Send mail from pl/sql
  
  Hallo,
  
  Does anyone have a good example on a procedure how to send 
 email from
  Pl/SQL. What I want to happen is to do  a select statement 
  and then send a
  mail with the result to the  address [EMAIL PROTECTED]
  Please help me with this. I would appreciate it very miuch.
  
  Thanks in advance
  
  Roland
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jesse, Rich
  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: Send mail from pl/sql

2002-04-06 Thread Abdul Aleem

The client's importance is because the site I mentioned perhaps has forms
for two types of e-mail clients.
I did sent you a procedure/function using UTL_SMTP with the e-mail address
of original sender. 

Peter Koltez's site address is:
http://ourworld.compuserve.com/homepages/peter_koletzke/tip.htm#formstips1

HTH!

Aleem


 -Original Message-
Sent:   Friday, April 05, 2002 8:33 PM
To: Multiple recipients of list ORACLE-L
Subject:RE: Send mail from pl/sql

Two questions:

1) Why should the client matter?
2) What is the web address of the site you mention?

TIA!

Rich Jesse   System/Database Administrator
[EMAIL PROTECTED]  Quad/Tech International, Sussex, WI USA


 -Original Message-
 From: Abdul Aleem [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 05, 2002 3:18 AM
 To: Multiple recipients of list ORACLE-L
 Subject: RE: Send mail from pl/sql
 
 
 Which mail client are you looking it for. If it is for MS 
 outlook, you can
 check at Perter Koltez's site
 
 Aleem
 
  -Original Message-
 Sent: Friday, April 05, 2002 12:33 PM
 To:   Multiple recipients of list ORACLE-L
 Subject:  Send mail from pl/sql
 
 Hallo,
 
 Does anyone have a good example on a procedure how to send email from
 Pl/SQL. What I want to happen is to do  a select statement 
 and then send a
 mail with the result to the  address [EMAIL PROTECTED]
 Please help me with this. I would appreciate it very miuch.
 
 Thanks in advance
 
 Roland
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jesse, Rich
  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: Abdul Aleem
  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: Send mail from pl/sql

2002-04-05 Thread Mark Leith

Roland,

Check out the Oracle supplied PL/SQL package UTL_SMTP:

http://download-uk.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a89852/utl_
smtp.htm

HTH

Mark

-Original Message-
[EMAIL PROTECTED]
Sent: 05 April 2002 08:33
To: Multiple recipients of list ORACLE-L


Hallo,

Does anyone have a good example on a procedure how to send email from
Pl/SQL. What I want to happen is to do  a select statement and then send a
mail with the result to the  address [EMAIL PROTECTED]
Please help me with this. I would appreciate it very miuch.

Thanks in advance

Roland

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  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: Mark Leith
  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).



Ang: RE: Send mail from pl/sql

2002-04-05 Thread Roland . Skoldblom


I am using Notes mail system

Roland




Abdul Aleem [EMAIL PROTECTED]@fatcity.com den 2002-04-05 01:18 PST

Sänd svar till [EMAIL PROTECTED]

Sänt av:  [EMAIL PROTECTED]


Till: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Kopia:

Which mail client are you looking it for. If it is for MS outlook, you can
check at Perter Koltez's site

Aleem

 -Original Message-
Sent:   Friday, April 05, 2002 12:33 PM
To:Multiple recipients of list ORACLE-L

Hallo,

Does anyone have a good example on a procedure how to send email from
Pl/SQL. What I want to happen is to do  a select statement and then send a
mail with the result to the  address [EMAIL PROTECTED]
Please help me with this. I would appreciate it very miuch.

Thanks in advance

Roland

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  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: Abdul Aleem
  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:
  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: Send mail from pl/sql

2002-04-05 Thread Bernard, Gilbert

 send_email.sql  send_email_attch.sql 

-Message d'origine-
De: Abdul Aleem [mailto:[EMAIL PROTECTED]]
Date:   vendredi 5 avril 2002 11:18
À:  Multiple recipients of list ORACLE-L
Objet:  RE: Send mail from pl/sql

Which mail client are you looking it for. If it is for MS outlook,
you can
check at Perter Koltez's site

Aleem

 -Original Message-
Sent:   Friday, April 05, 2002 12:33 PM
To: Multiple recipients of list ORACLE-L
Subject:Send mail from pl/sql

Hallo,

Does anyone have a good example on a procedure how to send email
from
Pl/SQL. What I want to happen is to do  a select statement and then
send a
mail with the result to the  address [EMAIL PROTECTED]
Please help me with this. I would appreciate it very miuch.

Thanks in advance

Roland

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  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: Abdul Aleem
  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).



send_email.sql
Description: Binary data


send_email_attch.sql
Description: Binary data


RE: Send mail from pl/sql

2002-04-05 Thread Jesse, Rich

Two questions:

1) Why should the client matter?
2) What is the web address of the site you mention?

TIA!

Rich Jesse   System/Database Administrator
[EMAIL PROTECTED]  Quad/Tech International, Sussex, WI USA


 -Original Message-
 From: Abdul Aleem [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 05, 2002 3:18 AM
 To: Multiple recipients of list ORACLE-L
 Subject: RE: Send mail from pl/sql
 
 
 Which mail client are you looking it for. If it is for MS 
 outlook, you can
 check at Perter Koltez's site
 
 Aleem
 
  -Original Message-
 Sent: Friday, April 05, 2002 12:33 PM
 To:   Multiple recipients of list ORACLE-L
 Subject:  Send mail from pl/sql
 
 Hallo,
 
 Does anyone have a good example on a procedure how to send email from
 Pl/SQL. What I want to happen is to do  a select statement 
 and then send a
 mail with the result to the  address [EMAIL PROTECTED]
 Please help me with this. I would appreciate it very miuch.
 
 Thanks in advance
 
 Roland
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jesse, Rich
  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).