UTL_SMTP Multiple emails on same connection (not multiple recipients)

  • From: Michael Moore <michaeljmoore@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 31 Aug 2010 11:49:57 -0700

Is there a way to send multiple/different emails without having to close and
re-open the connection for each email?
For example, (pseudo code)

Do this ....
   c   := UTL_SMTP.open_connection( 'localhost', 25 );
   send email (amount due $500 to mm@xxxxxxxxx)
   send email (amount due $25   to fred@xxxxxxxxx)
   UTL_SMTP.quit( c );

instead of this ...
    c   := UTL_SMTP.open_connection( 'localhost', 25 );
   send email (amount due $500 to mm@xxxxxxxxx)
   UTL_SMTP.quit( c );

    c   := UTL_SMTP.open_connection( 'localhost', 25 );
   send email (amount due $25   to fred@xxxxxxxxx)
   UTL_SMTP.quit( c );



Thanks,
Mike

Other related posts: