programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Wednesday, March 8, 2017

Sending E-Mail from PL/SQL

Sending E-Mail from PL/SQL:

You can send e-mail from a PL/SQL program or stored procedure using the UTL_SMTP package. You can find details about this package in the Oracle9i Supplied PL/SQL Packages and Types Reference.

The following code example illustrates how the SMTP package might be used by an 
application to send email. The application connects to an SMTP server at port 25 
and sends a simple text message.

PROCEDURE send_test_message
    mailhost    VARCHAR2(64) := '';
    sender      VARCHAR2(64) := '';
    recipient   VARCHAR2(64) := '';
    mail_conn  utl_smtp.connection;
    mail_conn := utl_smtp.open_connection(mailhost, 25);
    utl_smtp.helo(mail_conn, mailhost);
    utl_smtp.mail(mail_conn, sender);
    utl_smtp.rcpt(mail_conn, recipient);
-- If we had the message in a single string, we could collapse
-- open_data(), write_data(), and close_data() into a single call to data().
    utl_smtp.write_data(mail_conn, 'This is a test message.' || chr(13));
    utl_smtp.write_data(mail_conn, 'This is line 2.' || chr(13));
           -- Insert error-handling code here

Sql Server Interview Qus:


  1. Great site for these post and i am seeing the most of contents have useful for my Carrier.Thanks to such a useful information.Any information are commands like to share him.

    AWS Training in Chennai

  2. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Security Services in Chennai