Work around for uuencode attachments not displaying in Thunderbird 24.5.0

Written by James McDonald

June 16, 2014

I use a backup script to gzip and then email my webserver backups to my gmail account.

I was using the following line of code to attach the gzip / tar.bz2 files to an email.

( echo backup of $ETC; uuencode $DBDIR/$ETC $ETC ) | mail -s "Backup of $ETC $DATE" $TO

However when I viewed the resulting email in Thunderbird I see the encoded text in the body of the email instead of it being an attachment.

Looking for a work-a-round because I’m stuck with my version of Thunderbird I discovered I could change the way I send the backup files by changing from using the mail utility to mutt:

echo backup of $ETC | mutt -s "Backup of $ETC $DATE" -a $DBDIR/$ETC -- $TO

This changes the internal composition of the email so that Thunderbird is happy with it:

The way you should see your attachments in an email client:


Submit a Comment

Your email address will not be published.

You May Also Like…

PHP Iterators

Just came across a Youtube talk "Iterators in PHP" by Jake Smith published in 2014 that steps through the many...

PHP array_map Multiple Arrays

array_map can take multiple arrays. I like how it starts mapping through them starting at the first element of each...