Let us see how we can utilize UTL_MAIL to send Email form PL/SQL. Using the UTL_MAIL package is pretty straight forward.
Check the below example.
Check the below example.
begin utl_mail.send( sender => 'oracle@mydomain.com' , recipients => 'user1@mydomain.com,user2@mydomain.com' , subject => 'Test Mail from my Instance' , message => 'Test message' ); end ;
|
As you can see there are 4 different entities that you need to consider.
- Sender’s Email Id
- Recipient’s Email Id – You may include one or more recipients.
- Subject of the Email
- Message