format log file and send in email.

Hi guys i have one script which is as below

do 
some sqlplus output in to $LOG
sed '/^$/d' $LOG > /tmp/job.log
mv /tmp/job.log $LOG
awk '{if ($5=="COMPLETED") {print "backup completed at "$3" "$4 " of " $6 " for " d>> "/home/email.log" } else  {print "check backup for " d}}' d="$ORACLE_SID" $LOG
done
cat $EMAIL | mailx -s "STATUS" xxx@yyy.com
done

$EMAIL has output like below

backup completed at 06-JAN-2011 20:50:16 of DB for xx01q1
backup completed at 06-JAN-2011 21:01:24 of ARCHIVELOG for xx01q1
backup completed at 06-JAN-2011 21:26:36 of DB for xx02q1
backup completed at 06-JAN-2011 21:31:25 of ARCHIVELOG for xx02q1

and when it comes in email ..it comes like below ,,it comes like paragraph in 3 line.

backup completed at 06-JAN-2011 20:50:16 of DB for xx01q1 backup completed at 06-JAN-2011 21:01:24 of ARCHIVELOG for xx01q1 backup completed at 06-JAN-2011 21:26:36 of DB for xx02q1 backup completed at 06-JAN-2011 21:31:25 of ARCHIVELOG for xx02q1

I want the format like below both in EMAIL.log and outlook email.

backup completed at 06-JAN-2011 20:50:16 of  DB                                                             for xx01q1
backup completed at 06-JAN-2011 21:01:24 of  ARCHIVELOG  for xx01q1
backup completed at 06-JAN-2011 21:26:36 of  DB                                                             for xx02q1
backup completed at 06-JAN-2011 21:31:25 of  ARCHIVELOG  for xx02q1

please I need your help guys.

any command we can fix it so it comes very decent in outlook and both in file.

I came across similar problem in past and I appended another new line at the end of every line. That way your email file will look like:

backup completed at 06-JAN-2011 20:50:16 of DB for xx01q1
 
backup completed at 06-JAN-2011 21:01:24 of ARCHIVELOG for xx01q1
 
backup completed at 06-JAN-2011 21:26:36 of DB for xx02q1
 
backup completed at 06-JAN-2011 21:31:25 of ARCHIVELOG for xx02q1
 

And email body in outlook was as expected:

backup completed at 06-JAN-2011 20:50:16 of DB for xx01q1
backup completed at 06-JAN-2011 21:01:24 of ARCHIVELOG for xx01q1
backup completed at 06-JAN-2011 21:26:36 of DB for xx02q1
backup completed at 06-JAN-2011 21:31:25 of ARCHIVELOG for xx02q1

Stupid questions.
What is the value of "$EMAIL" ? What code generated that value?