Hi Friends,
While sending a mail from a shell script, is there a way i can mark some names in the To list and for some names i need then to be in the cc list.
Are there any options available for the same with the mail or mailx xommands where i can specify the names to be present in To : list or cc: list.
Thanks in advance
Dhruva
August 1, 2006, 3:16am
3
You can try with send mail utility...here is a script
SUBJ="Send mail from Unix with file attachments"
TO=urmail.com
CC=otherrec.com ,onemore.com
(
cat << !
To : ${TO}
Subject : ${SUBJ}
Cc : ${CC}
!
cat << !
HOPE THIS WORKS
you got the mail from sendmail utility
!
uuencode watch_script1.txt watch_script1.txt
!
) | sendmail -v ${TO} ${CC}
Hitori
August 1, 2006, 3:32am
4
And how about MIME-headers?
Dhruva
August 1, 2006, 3:41am
5
yes you are right "!" must be removed after uuencode command.Thanks for correcting me.I am not sure about MIME headers may be you can elaborate on this....thanks
Hitori
August 1, 2006, 3:44am
6
I've asked whether sendmail will add MIME-headers or they must be added manually??
Hi Hitori,
I tried using
mail -s "This is the subject" -c cc-abc.com to-def@gillette.com < $HOME/mail_contnts.txt
it is giving me invalid options error.
Hitori
August 1, 2006, 4:42am
8
Look at man mail, try to quote email addresses