Hi All,
I am using mailx command in shell script to send mail with output files as attachment to my email id.
When my colleague is running the shell script (script code mentioned below), he is getting the mail but without attachment. Attachment is appeared as junk characters in mail body.
But from my login the same script is running fine with the recipient mail id in script as
xyz@abc.com and I am getting the mail with attachment and correct output. Also, when I send mail to anybody else then also they are getting junk characters in mail body and I am getting mail with correct output !!!
Script Code to send mail
ATTFILE1=`echo update_error_${date_rcvd}.log`
ATTFILE2=`echo update_reject_${date_rcvd}.log`
ATTFILE3=`echo update_unused_${date_rcvd}.log`
ATTFILE4=`echo update_log_${date_rcvd}.log`
ATTFILE5=`echo filter_null_unused_${date_rcvd}.log`
ATTFILE6=`echo highest_noncancelled_error_${date_rcvd}.log`
ATTFILE7=`echo highest_noncancelled_unused_${date_rcvd}.log`
(cat mail_body.txt; uuencode ${ATTFILE1} ${ATTFILE1}; uuencode ${ATTFILE2} ${ATTFILE2}; uuencode ${ATTFILE3} ${ATTFILE3}; uuencode ${ATTFILE4} ${ATTFILE4}; uuencode ${ATTFILE5} ${ATTFILE5}; uuencode ${ATTFILE6} ${ATTFILE6}; uuencode ${ATTFILE7} ${ATTFILE7}) | mailx -s "Service DN Feed Processed2: ${i}" 'abc@xyz.com'
Any help would be of great appreciation.
Looking forward to your kind reply.
Nishant Pathak
email: Email addresses are not allowed - read the
Rules