hello I would like to send an email with attached a piece I try with the command uuencode but I have no mail in my mailbox that can help me please
cat body.txt | uuencode /root/report-20130322.pdf | mail -s "Daily Report" user@gmail.com
hello I would like to send an email with attached a piece I try with the command uuencode but I have no mail in my mailbox that can help me please
cat body.txt | uuencode /root/report-20130322.pdf | mail -s "Daily Report" user@gmail.com
No, sorry, we won't help you use uuencode. But we will recommend that you look at MIME instead. It's the current standard for including non-textual data in email. Whatever programming language you're using, there are many libraries to help you do it right.
which file do you want to attach? pipes are from left to right so this is done first and it is illegal:
cat body.txt | uuencode /root/report-20130322.pdf
probably you can try
cat body.txt > tmpfile
uuencode /root/report-20130322.pdf >> tmpfile
cat tmpfile | mail -s "Daily Report" user@gmail.com