Mail Server rejects PDF Attachments with Unknown Error
Acer Laptop. Windows 10 Pro (32-Bit) 21H2. Thunderbird Version 91.7.0 (32-Bit). Thunderbird Profile on 'D' drive. POP3/SMTP using Mozilla database settings. AVG Internet Security 2022. Firefox Version 97.0.0 (32-Bit).
Thunderbird reports it cannot send an email with a PDF attachment - see attached image (jpg to save space). It will send emails with attachments with other suffixes. It will send the PDF document if, prior to attaching, its suffix is changed - tested with suffix '.txt'. It will send the PDF document if it is zipped prior to attaching. It will not forward an received email that has a PDF attachment. Switching off Anti-Virus makes no difference.
Re-installing Thunderbird and restoring the original profile - made no difference. Installing Thunderbird on another 32-Bit Computer (an Acer Netbook) and using the original profile gave the same error. Installing Thunderbird on the Laptop and the other 32-Bit computer with a new profile and creating just 1 email account to the same Mail Server gave the same error.
An attached PDF document can be sent from the Acer Laptop using a home-made VB.NET Email Application using no encryption.
Changing the Thunderbird email account settings to the unencrypted port settings makes no difference.
A colleague with a 64-Bit desktop regularly sends out PDF documents using Thunderbird and the same Mail Server. (I set up Thunderbird for her.)
I am at a loss as to what to try next.
Alla svar (7)
jpg failed to load so created png image.
MartinOnline said
AVG Internet Security 2022.
Try with that products email scanning disabled. I dumped AVG about 15 years ago because it's mail scanner was way more trouble than it was worth. My experiences since are nil. But it is still suspect, especially as AVG consider PDF to be an executable file format. You might also try it with the product full disabled. I am using windows 10 pro with only windows defender. So far the only change from running an anti virus is lots less alert dialogs and apparently fast execution. (previous internet searches indicate AV could slow the device up to 30%)
Thanks for the advice. I tried switching off the Internet Security completely but still got the same error.
It is confusing that my home-made Email Application can send pdf attachments but Thunderbird cannot using the same server settings. My application uses plain text as in:
Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable
with the attachment encoded as in:
Content-Type: application/octet-stream; name=WebMethodInstructions.pdf Content-Transfer-Encoding: base64 Content-Disposition: attachment
Thunderbird's encoding could be different though that does not explain why other suffixed files can be sent.
My workaround is either to zip the pdf or to login to my mail server and send the pdf from there with a copy back to self.
The last time I sent a pdf successfully was on 1st February 2022 so some update or other, from Microsoft or Mozilla, has upset something.
With a bit of luck it will probably sort itself out but I did have to sort out a 'There is no email program associated ... "error which was not Windows fault. The rectification involved re-installing Thunderbird and then re-creating the accounts in the same order as previously created and altering the folderTree, prefs and panacea files to reflect the old folder structure, mail locations etc., then copying back only the emails from the original profile. I use local folders so that was quite simple.
Hence my suspicion about my current problem is that a setting has become corrupted but I cannot find data in a text-readable file that looks a likely candidate.
Thanks for the info on AVG, it will help my 14-year old netbook if I switched it off and relied on Defender.
Thunderbird's encoding WILL be different as the correct encoding for a PDF is application/PDF. The sub type application/octet stream is simply a declaration that the content is arbitrary binary data. This is relatively common with .net developers unfamiliar with media types and their importance in email and web development. Usually those same developers are unaware the recipients often can not open the attachment. The only action Thunderbird will offer for application /octet stream is to save the file.
Is your email account with BT one of the legacy yahoo ones? Yahoo have odd quirks with 7 and 8 bit encoding (apparently everyone lives in a US world according to them)
Generally in an instance like this I would recommend you reboot in safe mode with networking and see if your issue still exists. I find anti virus products rarely turn off as they say they do and safe mode with networking also removes all the other stat up programs that may interfere with things.
Windows 10 instructions for safe mode from Microsoft here.
Thanks for continuing to help me.
I tried sending a PDF whilst in Safe Mode but still could not do it. See attached image.
My email accounts are all BT Mail not Yahoo as far as I know; I had an email saying that they had been moved to BT Mail.
I must apologise for not investigating this before but I had been concentrating on the 3 main email addresses I use. I have 7 addresses and have found that 2 of them can send PDFs; the other 5 cannot with the same error. All addresses have the same individual SMTP settings.
Thus I tried using the SMTP server credentials of an email address that did send PDFs, replacing those of one that did not but, again, no PDFs could be sent.
I then reversed that, using the SMTP server credentials for an address that did not work for the SMTP server credentials of an address that could send PDFs. That email address could still send PDFs even with the credentials of an address that could not.
I wrote a simple VB.NET SMTP sender using microsoft's SMTP class, which I understand is deprecated. In this I enabled SSL and found I had to use port 587 which is associated with STARTTLS. This means I cannot guarantee any emails I sent using this simple sender were encrypted. That aside, this simple sender sent emails with PDF attachments using the troublesome email addresses.
Then I went back to Thunderbird and changed the encryption to STARTTLS with port 587. The same error arose with the troublesome email addresses.
The results of my investigation so far are confusing. I will continue to look for a solution; I will try 'Mailkit' which, perhaps, will guarantee encryption of any emails I send from a modified SMTP sender.
What is also confusing is that Thunderbird records an unknown error, I would have thought it would be able to give more information.
Perhaps it will sort itself out.
I use btinternet.
My Outgoing smtp server settings:
- Description: same as first part of username - so I can be sure that the account is actually sending using correct smtp where account name = user name.
- Server name: mail.btinternet.com
- Port: 465
- Username: full email address
- Authentication method: Normal Password
- Connection Security: SSL/TLS
Checked BT account was using correct smtp set up for that BT email address - select via drop down. I never use the 'Edit SMTP' button option to edit because if wrong smtp I may end up editing one that is correct for another account causing additional issues.
Tested sending of pdf as attachment and no problem.
As example - Source view of sent copy says: This is a multi-part message in MIME format.
0MgFnLxjYBKma2Y0nqgWaiFS
Content-Type: multipart/alternative;
boundary="------------um7Qefil5O9o0VV5LrUk9l63"
um7Qefil5O9o0VV5LrUk9l63
Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit
um7Qefil5O9o0VV5LrUk9l63
Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
0MgFnLxjYBKma2Y0nqgWaiFS
Content-Type: application/pdf; name="Schedule of Works.pdf" Content-Disposition: attachment; filename="Schedule of Works.pdf" Content-Transfer-Encoding: base64
You mention you believe all of your mail accounts have been moved over to BT Mail.
BT may have moved all of them, but they do claim they may move them at different times, so some may have moved and others not. However, you would have thought they should have got them all moved over by now as the original planned date was Oct 2020 - but it did get extended.
I recall Yahoo not liking pdf docs that were encrypted, so forcing people to zip them.
Are the pdf documents password protected/encrypted ? If yes then create a simple text pdf and do not encrypt/password protect. Then test a send of that pdf.
Thanks for your information and suggestions.
My email settings are all the same and the same as yours but only 5 out of the 7 BT email address I have are not sending PDFs. The other 2 can send PDFs. The PDFs I have used for the investigations are unencrypted and readable. Some as supplied to me and some produced from LibreOffice.
Looking back through my emails I see that all my addresses were transferred between 05/02/2020 and 04/06/2020.
I have now produced a simple email sender using Mailkit which definitely uses SSL. Mailkit has a verification problem with AVG Internet Security. As I understand it, the AVG Mail-Shield intercepts the connection to the BT Server and checks the BT certificate but then supplies a different self-certified certificate to Mailkit which then rejects it. When this was raised as an issue with AVG Support they offered a procedure to import their certificate into 4 common email applications, one of which was Thunderbird. I followed their advice but Thunderbird reported it already had the certificate. [No procedure was given for Mailkit.]
Notwithstanding the above I amended my Mailkit code to bypass the AVG Certificate check on the assumption that the AVG Mail-Shield would detect an invalid certificate from BT.
With this amended Mailkit email application I was able to send a PDF using one of my troublesome email addresses using the mail.btinternet.com, port 465 and SSL encryption with AVG Mail-Shield operating. I will be checking with the remaining email addresses.
Thus I believe I can eliminate AVG and BT as the root cause of my problems leaving only the state of my Thunderbird installation and my ageing laptop. Though for the life of me I cannot understand why the problem is selective.
At least I have learnt a few things about Thunderbird, AVG and sending emails.