Reputation:
I've just spent a lot of time trying to work out why, when I attach .zip files to programmatically generated emails in Gmail they just get stuck in the Outbox. In the process I discovered that the same happens if I just use Gmail and attach a zip file (where in both cases the zip file is valid, and located in External Storage using logic such as this:
File sdcard = Environment.getExternalStorageDirectory();
File dir = new File(sdcard.getAbsolutePath());
dir.mkdir();
OutputStream os = new FileOutputStream(new File(dir, filename));
If I use a different file extension (.zap, for instance) then in both cases (ie using the Gmail app and my own code) the email sends immediately (and arrives intact).
Any ideas why this might be, or what I can do to avoid having to give my zip files silly extensions?
Upvotes: 2
Views: 5686
Reputation: 1071
https://support.google.com/mail/answer/6590?hl=en mentions that you cant send a bunch of executable types inside a zip, or a password protected zip, or a zip in a zip.
Upvotes: 1