sqlplus output in html sqlplus -S -M "HTML ON TABLE 'BORDER="2"'" '/ as sysdba' @/home/oracle/DBA/dd.sql > dd.html echo "Database Size -- " | mailx -s "Database Size" -a dd.html anuj@xxxx.com This will send the email with attachment