title: Sending email attachment using uuencode and mailx
body: <p>I'm trying to get a system on my home network to send an image (.png) via email. The closest I have gotten is this:</p>
  
  <pre><code>uuencode -m snapshot.png snapshot.png | mailx -r "sending@myremoteserver.net" -s "Snapshot" -S smtp=smtp.myremoteserver.net me@myremoteserver.net
  </code></pre>
  
  <p>Which gets the mail to me, but the output leaves a bit to be desired...</p>
  
  <pre><code>begin-base64 755 snapshot.png
  AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8A
  AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
  AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA
  (well, you get the idea...)
  AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8A
  AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA
  AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/
  ====
  </code></pre>
  
  <p>The trouble is, I HAVE to send through smtp.myremoteserver.net. But the image file isn't getting decoded by my mail client (I've tried in Thunderbird and in various webmail interfaces, same result). Is there a better way that actually works?</p>
  
  <p>Update: Just for the fun of it, I ran this:</p>
  
  <pre><code>uuencode -m snapshot.png snapshot.png &gt; coded.txt
  </code></pre>
  
  <p>And upon decoding it, I got a scrambled, unviewable mess. So the problem must be with the uuencoding.</p>