You try to attach a file in Gmail and it refuses with 'Blocked for security reasons'. Or the email goes out, and a few seconds later a bounce arrives: 'This message was blocked because its content presents a potential security issue'. Or you are on the receiving end, and an attachment someone sent you can't be downloaded at all.
Gmail is not being random. It checks every attachment against a fixed list of risky file types, looks inside archives, scans for viruses, and enforces a size limit. Each message above comes from one of those checks, and once you know which one fired, the fix is usually quick. The exact wording tells you which check stopped the file, so start there:
- 'Blocked for security reasons' while you are attaching: the file type is not allowed in Gmail at all. See cause one.
- A bounce with '552 5.7.0' and 'This message was blocked because its content presents a potential security issue': the message reached Gmail and was rejected because of what was inside it. See causes one to three.
- Your attachment became a Google Drive link: the file was over the size limit. See cause four.
- 'Virus detected!' while sending, or an attachment you received that won't download: Gmail's virus scan found something, or couldn't finish. See cause five.
- 'Couldn't send message' or an attachment that never finishes uploading: an upload or storage problem rather than a security block. See the section after cause five.
Cause 1: The file type is on Gmail's blocked list
Gmail's help is direct about this: to prevent viruses, Gmail doesn't let you attach executable files, like files ending in .exe. It is not a scan result or a judgement about your file in particular. If the extension is on the list, the file is refused, however harmless it is.
Gmail's current list of blocked extensions is: .ade, .adp, .apk, .appx, .appxbundle, .bat, .cab, .chm, .cmd, .com, .cpl, .diagcab, .diagcfg, .diagpkg, .dll, .dmg, .ex, .ex_, .exe, .hta, .img, .ins, .iso, .isp, .jar, .jnlp, .js, .jse, .lib, .lnk, .mde, .mjs, .msc, .msi, .msix, .msixbundle, .msp, .mst, .nsh, .pif, .ps1, .scr, .sct, .shb, .sys, .vb, .vbe, .vbs, .vhd, .vxd, .wsc, .wsf, .wsh and .xll. Gmail says it often updates the types of files not allowed, so a file that went through last year can be refused today. Note that disk images (.iso, .img, .dmg, .vhd), Android apps (.apk) and plain JavaScript (.js) are all on it.
- Don't rename the file to sneak it past the check. A disguised executable arriving in someone's inbox is exactly what this rule exists to stop, and the person on the other end has no way to tell it apart from malware.
- If you are sure the file is safe, Gmail's own suggestion is to upload it to Google Drive and send it as a Drive attachment instead.
- For software you want other people to install, link to the official download page or app store listing rather than emailing the installer.
Cause 2: The file is inside a zip, or the archive has a password
Zipping a blocked file does not hide it. Gmail's help says blocked file types are also blocked in their compressed form, like .gz or .bz2 files, and when they are found inside archives, like .zip or .tgz files. So a .zip that contains a single .exe, .js or .bat file is refused just as if you had attached that file on its own.
A plain .zip is not on the blocked list. Zipping a folder of photos or PDFs is fine. The problem is what is inside it.
Password-protected archives are the other trap. Gmail's list of blocked content includes 'Password-protected archives with archived content'. Gmail can't open an encrypted archive to check what is in it, so it blocks it, even if everything inside is a harmless document. People often add a password to be careful with sensitive files and then find the email won't go.
- Open the archive and look for any file with a blocked extension, including in subfolders. Remove it, zip the rest again and reattach.
- If the archive only has a password for privacy, send it without the password through a route your organization approves, or upload the file to Google Drive and share it with the recipient's email address only.
Cause 3: A document with macros, or a link Gmail doesn't trust
Sometimes the attachment is an ordinary Word or Excel file and the message is still rejected with '552 5.7.0 This message was blocked because its content presents a potential security issue'. Gmail's help lists 'Documents with malicious macros' among the things it blocks, and says messages can also be blocked when they contain content, images or links that might spread viruses, even with no attachment at all.
Gmail does not tell you which macro or which link it disliked, so work through it by removing things.
- If the document contains macros you don't need, save a copy in a format without macros, for example a normal .docx or .xlsx instead of .docm or .xlsm, or export it as a PDF, and send that.
- If the document came to you from someone else, don't pass it on until you know what the macros do. Gmail flagging it is a reason to be careful, not a hurdle to get around.
- If there is no attachment, look at the links. Remove shortened links and links to file-download pages, then send again with only the links you actually need.
- Send a test with the attachment removed. If that goes through, the attachment was the problem; if it bounces too, it is something in the text or links.
Cause 4: The file is over 25 MB and became a Drive link
This one isn't a security block, but it is the most common reason an attachment isn't where people expect it. Gmail's help says that for personal Gmail accounts the limit is 25 MB, and if your file is bigger than that, Gmail automatically removes the attachment and adds it as a Google Drive link in the email. For work and school accounts, the Google Workspace administrator sets the sending and receiving limits.
The link is only useful if the recipient can open it. Gmail's help on Drive attachments says Gmail checks whether recipients have access to the file and, if they don't, prompts you to change the file's sharing settings before you send. If you dismiss that prompt, the recipient gets a link they can't open. On a work or school account, your admin may restrict which files you can share and with whom, and Gmail will tell you if a file can't be shared.
If the upload to Drive fails, you will see 'Couldn't send message'. Gmail's help says that means one or more files failed to upload to Drive, possibly because of low storage space or a slow connection. Remove the attachment, add it again and retry.
- When the sharing prompt appears, pick the option that lets your recipients open the file. Choose 'Anyone with the link' only if you're happy for the file to be opened by whoever the link gets forwarded to.
- For several medium-sized files, send them across more than one email so each stays under 25 MB.
Cause 5: Gmail's virus scan found something, or couldn't run
Gmail's help says attachments in messages you send and receive are automatically scanned for viruses. What you see depends on which side you are on.
When you are sending and the scan finds a virus, you get 'Virus detected!' and the option to send the email without the attachment. When someone sends you an infected file, Gmail rejects the message and lets the sender know. And if a virus is found in an email already in your inbox, you won't be able to download the attachment; it stays visible in the message but can't be saved.
There is one temporary version of this. If you see 'Gmail virus scanners are temporarily unavailable', Gmail couldn't scan the file at that moment. Google's advice is to try downloading it again later. Its help also says you can open the file at your own risk, but waiting is the safer choice.
- If Gmail won't let you download an attachment, contact the sender by another channel and ask what they sent. Their computer may be infected without them knowing.
- If your own file triggered 'Virus detected!', scan your computer with up-to-date security software before you send anything else.
- Never try to pull a blocked attachment out through another app or by downloading the raw message to get past the block. The block is the warning.
Attachments that won't upload or won't open
A few failures look like blocks but aren't. Gmail's help lists them separately.
- Your storage is full. Attachments count toward the storage shared across Google Drive, Google Photos and Gmail, and when it is full you can't send or receive attachments. Delete large old attachments and empty Trash and Spam.
- Attachments won't upload on a computer. Use a supported browser, try a different browser, or turn off any web proxy.
- 'Gmail's adding files'. Files are still uploading, possibly from another device. Wait for them to finish, or remove them to send right away.
- Attachments show as unavailable. Gmail's help says a network administrator or internet provider may be blocking 'mail-attachment.googleusercontent.com'. Try a different network, or contact your provider or IT team.
Prevent it next time
A few habits stop most of these before they happen.
- Check the extension before you attach. If it ends in .exe, .js, .bat, .msi, .iso, .apk or anything else on Gmail's list, don't email it.
- Look inside archives before sending them, and don't add a password to an archive you plan to send through Gmail.
- Send documents as .docx, .xlsx or PDF unless the recipient truly needs the macros.
- Keep each email under 25 MB on a personal account, or your organization's limit on a work account, and share anything larger as a link with the right access.
Sending big files without the size limit
If your problem is size rather than file type, for example a video, a set of high-resolution photos or large design files, OneSol Send at onesol.io/send uploads up to 5 GB per transfer and gives you one link to share. Recipients download without an account, the files delete themselves after 24 hours, and you need a free OneSol account to send.