E-mail Attachments


Dave Naylor

| 5 minutes

Categories: nerd

E-mail Attachments

Sending files attached to e-mails is a real pain in the backside


Everyone does it, it’s a simple click of a button and boom, you’re done. Sending files as e-mail attachments is one of the easiest and most convenient ways of sending stuff to people—yet I mostly hate it.

Here are my gripes:

  • Sending e-mail attachments can fill inboxes and leave them incapacitated.
  • Sending an e-mail with attachments to multiple recipients is horribly inefficient.
  • E-mails are routinely deleted which results in the “can you send me that file again” messages.
  • E-mails often pass through several mail transport agents before reaching their final destination. A size limit anywhere along the way can stop the transmission dead in its tracks. I personally impose a 7.5Mb total limit.
  • Malware can be distributed via e-mail attachments. Many e-mail servers actively block certain file types and e-mail providers will routinely throw such e-mails into a spam folder, if they allow them in at all.

The Mechanics

Let’s begin with describing what actually happens when you attach a file.

When someone wants to send a file attached to an e-mail, say an image, they click the paperclip button in their email software, select the image and maybe it then appears as a little thumbnail or icon at the bottom of the e-mail. That procedure invokes the impression that the e-mail has a little folder for attachments and the images are just dropped inside for transportation.

The reality is that your images are base64 encoded using the MIME standard. The binary image file is take by your e-mail software and transformed into text.

Here’s an image titled bananas.jpg; its size is 1.9Mb. I attached it to an email and my e-mail software created this block of base64 encoded data:

Hi

Here's that image.

--
Dave Naylor

--24t4ma7wrytmssa5
Content-Type: image/jpeg
Content-Disposition: attachment; filename="bananas.jpg"
Content-Transfer-Encoding: base64

/9j/4AAQSkZJRgABAQEASABIAAD/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRy
UkdCIFhZWiAH3AABABkAAwApADlhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAApkZXNjAAAA/AAAAF5jcHJ0AAABXAAAAAt3dHB0AAABaAAAABRia3B0AAABfAAA
ABRyWFlaAAABkAAAABRnWFlaAAABpAAAABRiWFlaAAABuAAAABRyVFJDAAABzAAAAEBnVFJD
AAABzAAAAEBiVFJDAAABzAAAAEBkZXNjAAAAAAAAAANjMgAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAB0ZXh0AAAAAElYAABYWVogAAAAAAAA9tYAAQAAAADTLVhZWiAAAAAAAAADFgAA
AzMAAAKkWFlaIAAAAAAAAG+iAAA49QAAA5BYWVogAAAAAAAAYpkAALeFAAAY2lhZWiAAAAAA
AAAkoAAAD4QAALbPY3VydgAAAAAAAAAaAAAAywHJA2MFkghrC/YQPxVRGzQh8SmQMhg7kkYF
UXdd7WtwegWJsZp8rGm/fdPD6TD////bAIQAAgMDAwQDBAUFBAYGBgYGCAgHBwgIDQkKCQoJ
DRMMDgwMDgwTERQRDxEUER4YFRUYHiMdHB0jKiUlKjUyNUVFXAECAwMDBAMEBQUEBgYGBgYI
CAcHCAgNCQoJCgkNEwwODAwODBMRFBEPERQRHhgVFRgeIx0cHSMqJSUqNTI1RUVc/8AAEQgj
KCMoAwEiAAIRAQMRAf/EALgAAAMBAQEBAQEBAQAAAAAAAAABAgMEBQYHCAkKEAEBAQACAgIC

That text is just the truncated tip of the iceberg. A one line email with a single file attachment resulted in over 37,000 lines of text. The size of the email jumped up to 2.6Mb of data; a 27% increase. It can be more.

Two images of the same size would mean 37,000 x 2, so 74,000 lines of text and so on and so forth.

Crazy Numbers

Imagine sending a group email with five attachments to ten people. Each attachment could be 50,000 lines of text which would equate to a two and a half million lines over the ten e-mails. If someone group replies and leaves the attachments intact but also attaches more files, the numbers involved get ridiculous.

A Better Way — Cloud Storage

Instead of sending thousands of lines of text to one or many recipients, why not send just one line. A link to the file or files.

Dropbox, pCloud, Google Drive and many other services offer free accounts where you can upload and then share files. The service provides a link to share single or multiple files which you can distribute in an e-mail to all interested parties.

If they too create a free account at one of the services, they can copy the file to their account and never lose it. No more e-mithers asking for repeat copies.

That has to be better. It’s an absolute no-brainer.

Typical examples of attachment misuse

I volunteer IT skills and more at a rugby club close to my heart. There’s not really a technically-minded environment at the club. It’s not anyone’s fault, it’s just typical of a lot of organisations. Here are a few facepalms:

  • One guy, bless his cotton socks, would send me an email and ask me to attach an image to it. He’d then receive my email, add-in another recipient and send them the email plus attached image. He’d then send the email back to me, with the attached image I’d sent to him, for inclusion on the club website that I built and manage.

  • A club photographer had a brain fart and decided to send me twenty or so photographs each attached to a separate e-mail. They were hefty sized images.

    That resulted in my paid-for email plan going way over its daily bandwidth limit (for the first time in ten years) and blocked emails across my domains for the remainder of the day.

  • Unedited or untrimmed e-mail group replies would inexplicably (to me) arrive with the attachments from the original email still attached, often with further attachments.

  • Collaborative files (match programme draft copies) would be sent out to multiple recipients and they were often really big files. Subsequent drafts would be similarly attached to the e-mail, sometimes with the first draft still attached.

    The drafts would not be subject to any kind of version control and all bear the same name. OMG.

  • E-mail signatures would have images included as attachments and not embeds. I used to auto-forward e-mails with attachments to a service that would strip them out and plonk them in cloud storage for me. I ended up with multiple copies of the signature images all renamed and not overwritten. Arrrrgghhhhh!

Image Naming

A quick side-whinge.

If you’re going to send me an image of literally anything, for Pete’s sake name the bloody file properly. If I receive an image named like any of these, I literally hate you:

  • Straight from a camera such as IMG2346789.JPG. A day later I have no idea what that files represents.
  • A copy of an image IMG2346789-copy.JPG. Yeuch.
  • An image or in fact any file containing spaces: my lovely image.jpg. I"m a *nix guy, files SHOULD HAVE NO SPACES

I want to receive files named like this: fred_bloggs_20200825.jpg

Photo by frank mckenna on Unsplash


Comments


Previous post

E-mail Quoting