Accepting attachments via email is tricky. If you’re not careful, you end up with countless garbage files cluttering threads and eating up account storage limits. Whether it’s something as simple as signature files adding corporate logos from every email or something more insidious like email clients varying in how they handle HTML attachments, it’s easy to get it wrong.
This is one of those situations where are countless edge cases based on email client, file types, and other variables, so we don’t want to just flip a switch for everyone. Instead, we’ll be rolling it out gradually to accounts that are interested in helping beta test it. So, if you’re interested, just drop us a line and let us know.
File Acceptance Rules
The most insidious of all superfluous email attachments are signature files. Corporate logos and related images make it difficult to know what’s a legitimate image attachment and what’s a signature file that you don’t want to see repeated over and over again every time someone responds.
So how does one go about preventing this? Any file that comes in via email gets a unique signature and we associated it with a given user. Then, in the future, if we see a file with the same unique signature for that user, we simply assume that it’s a signature file and ignore it.
This approach isn’t perfect because it will let the first encounter come through before we recognize it in the future. For now, just to be safe, we only begin ignoring these files after we’ve seen them twice. So the first two appearances will show up. This rule also focuses more on images as few signatures contain non-image content.
Also tricky are the previous attachments that linger when people reply and forward emails. In our case, we include thumbnails of image attachments in our email notifications. The last thing that we want to do is accept those thumbnails as attachments when people reply. So we check incoming attachments against existing files and thumbnails to make sure that they aren’t accidentally added.
Email & HTML
The final challenge is around HTML (and to some degree plain text) attachments. Like web browsers, email clients are varied to say the least. How they handle HTML and plain text varies because emails themselves can include both plain text and HTML content for the email body. In some cases, this makes it difficult to distinguish between attachments and the body of the email.
While we hope to fine-tune this long-term, for now the plan is to ignore plain text and HTML attachments given that are incredibly rare. In these cases, if you want to include HTML or plain text files, they can be zipped up and emailed as zip files.
Ready to try it?
After an extended beta period. This is ready to go. Just visit your profile page, go to “Project Emails” and send an email with an attachment to create an issue.