mail problem

hi folks ,
i am working in UNIX . i was wondered when i gone through below lines in some scripts. Can anyone describe me how this is working . thanks in advance..

/usr/sbin/sendmail -t < $0.email
/usr/bin/mailx -s "$EDI_HOST: Report....@ `date`" GROUP_ALERT <<EOF
`cat $0.email`
EOF

The sendmail line is sending an email, the $0.email will need to contain at the very least a line specifying the address for the email to go to at the top, e.g.:
To: foo@baa.com

Usually you would also have a from line and a subject line as well.

The mailx line is also sending an email with the subject after the "-s", GROUP_ALERT is presumably a mail alias for an email address or list of mail addresses, the body of the email is the contents of the $0.email file.

hi Tony
Thnks for reply. can u tell me how can i create alias or listaof mail address like GROUP_ALERT

Add a line to the file:
/etc/mail/aliases
e.g.:

GROUP_ALERT: mailuser1@foo.com, mailuser2@foo.com

with one or more email addresses, comma separated.

Then run the command:

$ newaliases

to make sendmail to see the changes to the alias list.