All,
I am using following procedure to sent out the mail. here , the output sent by the mail is not formatted and there is less clarity reading out the output. here, I am looking out , if I can modify this and sent out the output in html format using the utl_mail or using some of the format tags to make it look appear more clear.
CREATE OR REPLACE PROCEDURE object_created AS
CURSOR driver IS -- find all employees not in a department
SELECT owner , object_name , object_type from dba_objects where to_date(created)='13-JUN-14';
buffer CLOB := null; -- the e-mail message
BEGIN
FOR rec IN driver LOOP -- generate the e-mail message
buffer := buffer ||
rec.owner || ' ' ||
rec.object_name || ', ' ||
rec.object_type || chr(10);
END LOOP;
-- Send the e-mail
-- IF buffer is not null THEN -- there are employees without a department
buffer := 'Owner ' || 'object_name ' || 'object_type ' || CHR(10) || buffer;
UTL_MAIL.SEND (
SENDER=>'abc@abc.com',
RECIPIENTS=>'abc@abc.com',
SUBJECT=>'Object Created',
MESSAGE=>buffer);
--END IF;
END;
/
output
Owner object_name object_type
GMW1 PKG_GMW_GCS_INTEGRATION, PACKAGE BODY
GMW1 PKG_GMW_IMW_INTEGRATION, PACKAGE BODY
GMW1 PKG_GMW_PDS_INTEGRATION, PACKAGE BODY
GMW1 PKG_GMW_PROD_SITE_MST, PACKAGE BODY
GMW1 PKG_GMW_TLM_INTEGRATION, PACKAGE BODY
GMW1 SP_PRG_ELE_TASK_BY_ELE_CREATE, PROCEDURE
SYS UTL_MAIL, PACKAGE
Regards