Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2002
    Posts
    6

    Unanswered: sending email thru Pl/Sql in Oracle 8.0.5

    I want to send email thru Pl/SQL in oracle 8.0.5, but dont know if i can. If it can be possible how should i go about it? I dont want to use Java or any other external procedure. Please guide me if anyone knows about it.
    Thanks

  2. #2
    Join Date
    Oct 2002
    Posts
    3

    Re: sending email thru Pl/Sql in Oracle 8.0.5

    Originally posted by mp_lko
    I want to send email thru Pl/SQL in oracle 8.0.5, but dont know if i can. If it can be possible how should i go about it? I dont want to use Java or any other external procedure. Please guide me if anyone knows about it.
    Thanks
    I have used the utl_smtp package before. However, you need to have acces to a mail server from the database server. In the sample below you can replace the l_host variable with the IP address of the server. Other variables are used for storing the mail attributes.

    mail_conn := utl_smtp.open_connection(l_host, 25);
    utl_smtp.helo(mail_conn, l_host);
    utl_smtp.mail(mail_conn, l_sender);
    utl_smtp.rcpt(mail_conn, l_rec);
    utl_smtp.data(mail_conn, l_message);
    utl_smtp.quit(mail_conn);

    I hope this helps
    Regards,
    Mark

  3. #3
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482

    Cool

    Examples how to send e-mail from PL/SQL and JAVA code are given Here

    Try them and post if you have any problems.

    Hope that helps,

    clio_usa
    OCP - DBA

    .

  4. #4
    Join Date
    Sep 2002
    Posts
    6
    I know about the package utl_smtp but the problem is that oracle 8.0.5 does not contain this package. if u know about any other option please do guide me. I realy appreciate your help
    thanks


    Originally posted by clio_usa
    Examples how to send e-mail from PL/SQL and JAVA code are given Here

    Try them and post if you have any problems.

    Hope that helps,

    clio_usa
    OCP - DBA
    Visit our Web Site
    .

  5. #5
    Join Date
    Sep 2002
    Posts
    6

    Re: sending email thru Pl/Sql in Oracle 8.0.5

    i know that we can do that thru utl_smtp function but oracle 8.0.5 does not have this built-in. If u know of any other method please tell me.
    thanks

    Originally posted by markv
    I have used the utl_smtp package before. However, you need to have acces to a mail server from the database server. In the sample below you can replace the l_host variable with the IP address of the server. Other variables are used for storing the mail attributes.

    mail_conn := utl_smtp.open_connection(l_host, 25);
    utl_smtp.helo(mail_conn, l_host);
    utl_smtp.mail(mail_conn, l_sender);
    utl_smtp.rcpt(mail_conn, l_rec);
    utl_smtp.data(mail_conn, l_message);
    utl_smtp.quit(mail_conn);

    I hope this helps
    Regards,
    Mark

  6. #6
    Join Date
    Sep 2002
    Posts
    6
    the link u provided is great but the problem is that oracle 8.0.5 does not have the utl_smtp package or the utl_tcp package. We dont have to use java. So if can help me with any other method to do this i would appreciate it.
    thanks


    Originally posted by clio_usa
    Examples how to send e-mail from PL/SQL and JAVA code are given Here

    Try them and post if you have any problems.

    Hope that helps,

    clio_usa
    OCP - DBA
    Visit our Web Site
    .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •