0

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
user1794019
  • 59
  • 1
  • 3
  • 9
  • 2
    Do you really want to use uuencode in 2013? It's pretty well obsolete, you know. I checked my archives, and I haven't sent or received a single email using uuencode in almost 13 years. – Celada Mar 22 '13 at 17:13

2 Answers2

1

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.

james.garriss
  • 12,959
  • 7
  • 83
  • 96
0

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
Aimin Pan
  • 56
  • 1