Are you a developer and use Gmail frequently to send and receive JavaScript files of your project? Then you soon need to find another way to send those files. Starting 13th February 2017, Gmail will block JavaScript (.js) files from being attached and sent over email. The current restriction is in place for security reasons, as JavaScript files are being increasingly used for malware attacks.

You may already know, Gmail won’t allow sending emails with Windows executables (.exe), batch files (.bat), .msc and several other file types [link] in attachments. Now JavaScript (.js) joins the malicious group and being blocked from Gmail file attachments. If you accidently downloaded and open a  malicious JavaScript file, hackers will able to control your Windows PC and stole data.

Gmail to block JavaScript (JS) file attachments in emails

If you act clever and try hiding those files in a compressed zip or RAR format, then also Gmail will find out and block those emails. You can still send JavaScript files over email, but for that, you first need to upload the files to cloud storage services like Google Drive, Google Cloud Storage, and Dropbox and then share or send the download link over email. We would suggest using Google Drive for file uploads as it got a full-fledged integration with Gmail.

Gmail will show a warning when you try to attach a JavaScript or other banned file type to emails. For inbound emails, the sender will get a bounce message from Gmail explaining about why their email was blocked.

You're currently offline