If you have Avast Antivirus and Mozilla Thunderbird, there is a known incompatibility between the two. Thunderbird makes temporary HTML files to send HTML emails and Avast “grabs” them for scanning when they’re made, which causes Thunderbird to get “locked out” and throw the error message about a file that cannot be attached.
You will need to exclude the “nsemail” files generated by Thunderbird from being touched by Avast. To do this, open Avast, go to Settings, go to Active Protection, and change the settings for File System Shield.
Pick the “Exclusions” option on the left side. Go to the bottom of the list and there will be a blank space to type a new exclusion into. Paste or type this string in there:
Click OK and close Avast. Thunderbird can now send messages without being cut off by Avast. Send a test email to yourself to be sure it works.