Gmail – Why Can’t I Attach My Zip File?

gmail

Gmail has some restrictions about which files can go on a zipped attachment (https://support.google.com/mail/answer/6590). I want to attach a small zip file (146.7 kB), which only contains the following extensions: php, css, js, png, jpg, plus some text files without extension. There's no zip file inside the zip file. It seems I'm following their rules.

So why do I keep getting a "safety reasons" block?

Some details: the file was created by "zip" application Zip 3.0 (July 5th 2008), by Info-ZIP running in Ubuntu 14.04. The command line was:

sudo zip pl20151214.zip * icon/* ../../includes_pl/*

Looks like there are some problems regarding the ../../ path. I can't exclude it using Archive Manager 3.10.2.1 for GNOME. But recreating the zip without this path the problem is solved.

Best Answer

Answer to why: Most likely it contains an executable file.

There are many blocked filetypes.

You showed the correct link as to which types are blocked.

Why messages get blocked (Support.Google.com)

Excerpt:

File types you can't include as attachments

.ADE, .ADP, .BAT, .CHM, .CMD, .COM, .CPL, .EXE, .HTA, .INS, .ISP, .JAR, .JS (NEW), .JSE, .LIB, .LNK, .MDE, .MSC, .MSI, .MSP, .MST, .NSH .PIF, .SCR, .SCT, > .SHB, .SYS, .VB, .VBE, .VBS, .VXD, .WSC, .WSF, .WSH

This applies to .zip and .7z and .rar files.

Back in the day, all you had to do was rename the .zip file to something else like .txt but that no longer works. It is now doing a deeper inspection than before. (February 2018)

The easiest way around it is to upload your ZIP file to Google Drive then use the Drive Attach button at the bottom to send it as a link.

The Drive Attach button is right next to the normal Attach (paperclip) button.