Skip to main content

Send executable file as attachment through email

Gmail, Yahoo Mail, or many other free email service providers normally don’t allow us to attach an executable (.exe) file with the email and send or receive them across the internet. We normally get such type of error while sending executable as attachment “xxx.exe contains an executable file. For security reasons, Gmail does not allow you to send this type of file”.

Due to security threats (like virus, worms, trojans or bots) email anti virus scanners employed by email service providers, all emails and their attachments are scanned and each and every type of executable is barred from getting send or receive through email.

Thus, we cannot send or receive any type of executable such as exe, dll, com, bat, etc through emails. Even if we try to send any executable by zipping it using any archiving tool (zip, tar, tgz, taz, z, gz), we cannot send or receive emails.

But here is the way out, well through minor tweaks we can still send executable attachments through email :
  1. If there is only one executable that you want to send, then just rename the extension of the executable file from say “xxx.exe” to something like “xxx” or “xxx.ex”. Now attach this renamed file with the mail and send it. Email scanners will not be able to detect it as executable and thus it can be easily sent across the internet through email. At the recipient’s end after downloading the attachment we just need to rename it back to its original name i.e. from “xxx” or “xxx.ex” to “xxx.exe”.
  2. If there are two or more executable to be sent through email or if you want to send two or more files (in which few of them are executable) through email then here are the two ways :
  • First zip them using any archiving tool you have like zip, tar, tgz, taz, z or gz then rename the archived file lets say from “” to something like “xxx” or “xxx.zi”, attach it to the email and send it. Email scanners cannot recognize renamed archive file and treat it like a single file thus it will be easily sent across the internet through email. At the recipient side, download the attachment and rename it back to its original name.
  • If you want to bypass this headache of renaming files then just archive the file with an encryption option and lock it with a security password. Encryption feature of archiving tools uses industry standard encryption algorithms and thus email scanners won’t be able to scan your attachment as they don’t have the password to open it. So attach this encrypted archive file with the mail and send it across the internet through email. Please note : do mention the security password used to lock the archive in the mail otherwise recipient will not be able to unzip the file.
  • There is one more easier way to send the archive through email. Just zip them using a “Winrar” or any other “.rar” archiving tool. Archive in “.rar” format is not recognized by the email scanners as an archive thus email scanners treat it as a single file and thus it can be easily attached and sent across through email. Please note : recipient also need some “.rar” archive tool to unzip the file.
Happy Emailing!!!


Popular posts from this blog

Exploring Node.js Internals

I found a great article explaining Node JS internals, must read : Some other articles : Introduction to Node.js Being an official website, explains what Node.js is, as well as its package managers, and lists web frameworks built on top of it. “ JavaScript & Node.js ”,  The Node Beginner Book This book by  Manuel Kiessling  does a fantastic job of explaining Node.js, after warning that JavaScript in the browser is not the same as the one in Node.js, even though both are written in the same language. Beginning Node.js This beginner book goes beyond an explanation of the runtime. It teaches about packages and streams and creating a web server with the Express framework. LibUV This is the official documentation of the supporting C++ code of the Node.js runtime. V8 This is the official documentation of the JavaScript engine that makes it possible to write Node.js with JavaScript.

Hibernate Object Conversations

Session methods to use for object conversations Save() A new instance being attached to the session. An insert will be scheduled. Update() Call Update to make a transient object persistent again. It will force a SQL update on the transient object. This is because Hibernate does not know whether the object is dirty or not and to be safe by default schedules an update. This method will throw an exception, if the entity is already registered with the session. - NonUniqueObjectException is thrown. saveOrUpdate() Either a save or an update will be called based on whether the identifier exists or not. No identifier - save is called, else update is called. Or for a better understanding, if the object is transient, then a save is called, if the object is persistent, then an update is called. Reattaching an unmodified instance - If you know for sure that an object is not modified and you just want to make it persistent again - Session.lock(item, LockMode.No