dancko's blog

Send SMTP Mail using UTL_SMTP Package


In this first my blog entry I wish to post the code for send an Email message from one sender to one receiver.
The code is the follow:

  v_From      VARCHAR2(80) := 'sender.mail.com';
  v_Recipient VARCHAR2(80) := 'receiver.mail.com';
  v_Subject   VARCHAR2(80) := 'test subject';
  v_Mail_Host VARCHAR2(30) := 'smtp.libero.it';
  v_Mail_Conn utl_smtp.Connection;
  crlf        VARCHAR2(2)  := chr(13)||chr(10);
 v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25);
 utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
Subscribe to RSS - dancko's blog