I am fetching a database table in spool file and send that details as a email.
The Spooled file content is properly being displayed in UNIX.
See Example below :
ID|FILENAME |ABCDEF_DT |PROCESSED_DT |STATUS
----------|-----------------|----------|--------------------|----------
1|FILENAME |09-sep-2012|11-sep-2012 04:09:31|SUCCESS
2|FILENAME |02-jul-2012|11-sep-2012 04:09:58|SUCCESS
3|FILENAME |09-sep-2012|11-sep-2012 04:09:38|SUCCESS
However, when i send the same content as a email. The data is not displayed properly ("-----|---- '' this lines are getting repeated after the column name )
See example below which is being displayed in outlook:
ID|FILENAME |ABCDEF_DT |PROCESSED_DT |STATUS
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|-
1|FILENAME |09-sep-2012|11-sep-2012 04:09:31|SUCCESS
2|FILENAME |02-jul-2012|11-sep-2012 04:09:58|SUCCESS
3|FILENAME |09-sep-2012|11-sep-2012 04:09:38|SUCCESS
I am spooling the file and then using the below command to send an email.
Also, have set the below for the sool file:
set feedback off lines 32766 TERM OFF pagesize 32766 trimspool on colsep "|"
cat $spool_file_name | mailx -s "message" -r email_id
Can anyone help me out to resolve this issue and to get the output similar to the spool file generate in unix. (i.e. avoid repetition of "-------|-----" after column)
Thanks in Advance !!