I have created a sql file and it will create a HTML file with query result.But I'm unable to retrieve a html body in my email instead am getting a mail body with html tags.Please help
sql----
--sample HTML report.
--
-- Usage: sqlplus LOGON @script OUTPUT_FILENAME
--
-- Activate HTML output and configure the generated markup.
SET MARKUP HTML ON SPOOL ON -
HEAD '<title>My Report</title> -
<style type="text/css"> -
table { background: #eee; font-size: 80%; } -
th { background: #ccc; } -
td { padding: 0px; } -
</style>'
-- Dump results to the file that is given on the command line.
SPOOL &1
-- Only dump to file, not to the terminal.
SET TERMOUT OFF
-- Titles and formatting of columns.
COLUMN name HEADING 'Name'
--COLUMN job HEADING 'Job Title'
--COLUMN salary HEADING 'Salary' FORMAT $99,990
-- The query
--
select tablespace_name from dba_tablespaces;
/
-- Close file, which also closes the HTML tags.
SPOOL OFF
-- Back to non-HTML output
SET MARKUP HTML OFF
mailx command----
mailx -s 'file system'
c.bambarandage@prima.com.lk < sam.html
Thanks,
Charith.