Thanks a bunch.
Mayura Mangale
Project Manager I, Research Computing
-----Original Message-----
From: Shruti K. Mittal [mailto:[Email address protected]
Sent: Tuesday, August 17, 2004 12:51 AM
To: Mayura M. Mangale
Subject: RE: Sending Email from Oracle
Hello !!
Use DBMS_JOB.SUBMIT for scheduling the mailing-procedure
Try to search the web, for its not a difficult task, before asking such
questions.
don't mind.
Regards,
./shruti
-----Original Message-----
From: mmmangal [mailto:[Email address protected]
Sent: Monday, August 16, 2004 8:42 PM
To: [Email address protected]
Subject: RE: Sending Email from Oracle
**A LazyDBA.com subscriber has responded to your lazydba.com post**
**LazyDBA.com mail shield has forwarded you this email,
**and removed any attachments, and kept your email address secret
**from this person, and any viruses/trojans.
**If you reply to this email, the person will see your email address as
normal
**Anything below this line is the original email text
How do you automate this process.
I want to send emails day at 8am. Si there any package for this one?
Mayura Mangale
-----Original Message-----
From: Shruti K. Mittal
[mailto:oracledba-ezmlmshield-x54677989.[Email address protected]
Sent: Monday, August 16, 2004 10:42 AM
To: LazyDBA Discussion
Subject: RE: Sending Email from Oracle
Hello!
UTL_SMTP will be yor required package.
see the attached procedure if it helps you
CREATE OR REPLACE PROCEDURE mailout
(
Sender IN VARCHAR2,
toRecipient IN VARCHAR2,
ccRecipient IN VARCHAR2,
Subject IN VARCHAR2,
Message IN VARCHAR2
)
IS
crlf VARCHAR2 (2) := UTL_TCP.crlf;
connection UTL_SMTP.connection;
mailhost VARCHAR2 (30) :=
'smtp.your.server.name';
header VARCHAR2 (1000);
BEGIN
--
-- Start the connection.
--
connection := UTL_SMTP.open_connection (mailhost, 25);
header :=
'Date: '
|| TO_CHAR (SYSDATE, 'dd Mon yy
hh24:mi:ss')
|| crlf
|| 'From: "Oracle Database" <'
|| sender
|| '>'
|| crlf
|| 'Subject: '
|| subject
|| crlf
|| 'Organization: Your Company NAme'
|| crlf
|| 'To: '
|| toRecipient
|| crlf
|| 'CC: '
|| ccRecipient
|| crlf
|| 'Disposition-Notification-To: "Oracle
Database" <'
|| sender
|| '>'
|| crlf
|| 'Importance: High';
--
-- Handshake with the SMTP server
--
UTL_SMTP.helo (connection, mailhost);
UTL_SMTP.mail (connection, sender);
UTL_SMTP.rcpt (connection, toRecipient);
UTL_SMTP.rcpt (connection, ccRecipient);
UTL_SMTP.open_data (connection);
--
-- Write the header
--
UTL_SMTP.write_data (connection, header);
--
-- The crlf is required to distinguish that what
comes next is not simply
part of the header..
--
UTL_SMTP.write_data (connection, crlf || TRIM(Message) ||
crlf || crlf ||
'Best Regards,' || crlf || 'Shruti K. Mittal');
UTL_SMTP.close_data (connection);
UTL_SMTP.quit (connection);
END;
/
regards
./shruti
-----Original Message-----
From: Rene Zhao
[mailto:oracledba-ezmlmshield-x58778742.[Email address
protected]
Sent: Monday, August 16, 2004 8:09 PM
To: LazyDBA Discussion
Subject: Sending Email from Oracle
Hi,
Can anybody tell me how to send email from Oracle? I know
there's a
built-in package but can't recall the name. I'm using
Oracle9i
Enterprise Edition Release 9.2.0.1.0 on Windows 2003.
Thanks,
RZ
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see
http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see
http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
RE:
Oracle LazyDBA home page