Seamonkey sending pdf inline rather than as attachment

User Help for Seamonkey and Mozilla Suite
Locked
AlasdairWhite
Guest

Seamonkey sending pdf inline rather than as attachment

Post by AlasdairWhite »

I am using a Mac G4 running MacOSX (10.4.11) and I run Seamonkey 1.1.12 on it for all my email and some of my web research. A couple of upgrades ago, I encountered a problem when sending pdf files as attachments. I attach the pdf file as usual and send the email - the resulting copy shows that the pdf file is both attached and displayed, in code, inline. A number of recipients are having problems as they say they can't read the attachment (which I am sure actually means they are not saving and/or detaching the attachment and opening it in the pdf reader application) and they say it is simply "gobbledgook" (i.e. showing up as inline code). This only occurs with pdf files. Can someone please advise me on what I should do to resolve this issue.

Alasdair
User avatar
makaiguy
Posts: 16878
Joined: November 18th, 2002, 6:44 pm
Location: Somewhere in SE USA
Contact:

Re: Seamonkey sending pdf inline rather than as attachment

Post by makaiguy »

I'm familiar with Thunderbird, not Seamonkey, but I expect they're the same in this regard.

Check the source code of one such message in your Sent folder (menu path View | Message source - at least that's what it is in TBird, I expect SM will have something similar). Scroll down until you find the big block of unintelligible text that makes up the actual attachment. Just above this will be a block of header information for the attachment. Here's one from a pdf file in one of my messages:

Code: Select all

------=_NextPart_000_000C_01C9286D.E6185370
Content-Type: application/pdf;
   name="Results-Persimmon Hill.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
   filename="Results-Persimmon Hill.pdf"

Note the "Content-Type" line. For a pdf file, this should be "application/pdf". I suspect yours will say something else that relates to a content type that Tbird and other email clients know how to handle internally, such as "text/plain" or "image/gif". This is why the pdf file is being shown as text.

When SM creates the message, the information that tells the program what Content-Type to specify for an attached file is located in a file in your profile. In TBird this is called "mimetypes.rdf", and I expect it probably has the same name in Seamonkey. Exit Seamonkey, go into your Seamonkey profile, and rename "mimetypes.rdf" to something else, such as "mimetypes.rdf.bak". Now restart Seamonkey. It will find mimetypes.rdf is missing and will create a new default one, which should include the correct information for pdf attachments. This won't affect messages that have already been sent, but should set up any new messages you create correctly. If you have set up any custom file handling protocols (i.e. told Seamonkey which programs to use to open specific types of attachments) you'll have to set these up again.

Where to find your profile:
http://kb.mozillazine.org/Profile_folder
Windows users, be sure to read the last paragraph in the "For Windows Users" note re displaying hidden folders. Also, you may want to turn off "Hide extensions for known file types".
Doug Wilson
Win10 64bit: FF 115.0.02 64bit, TB 102.12.0 32-bit ║ Android 13/10: FF 115.2.0/115.0.1 ║ No TB for Android available, dammit!
What a fool believes he sees, no wise man has the power to reason away - Doobie Brothers
rsx11m
Moderator
Posts: 14404
Joined: May 3rd, 2007, 7:40 am
Location: US

Re: Seamonkey sending pdf inline rather than as attachment

Post by rsx11m »

makaiguy wrote:I'm familiar with Thunderbird, not Seamonkey, but I expect they're the same in this regard.

It's the same back-end code for both Thunderbird and SeaMonkey, thus your assumption is correct.

Another possibility in addition to a faulty MIME entry, the excerpt is from above listing:

Code: Select all

Content-Disposition: attachment;

This has frequently been seen as a problem, by default all attachments are sent as "inline" rather than "as attachment", leaving it up the receiving client to decide whether or not it actually can be displayed inline as well. Thus, a proper PDF-plugin (which is not available for mail/news in Mozilla applications) could display that document within the context of the message.

If this turns out to be the problem, you can enter about:config into the location bar, then copy-paste mail.content_disposition_type into the search bar. Double-click on the entry that remains and change 0 to 1, this would result in the attributes makaiguy mentioned.
AlasdairWhite
Guest

Re: Seamonkey sending pdf inline rather than as attachment

Post by AlasdairWhite »

Good afternoon to you both.

Thanks for the response – I checked as suggested and this is the info I am getting:

Content-Type: text/pdf;
name="AnalysisMacleanNetSurvey.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="AnalysisMacleanNetSurvey.pdf"

Two things don’t match what you guys have suggested and so I did the following:

1) I went into about:config and then to mail.content_disposition_type and changed the 0 to a 1.

That didn’t fix the problem so – since I use a Mac

2) I went to the Seamonkey>Preferences>Navigator>Helper Preferences and ensured that application/pdf was present - it was, so I then deleted text/pdf

Here is the result from a test email thereafter:

Content-Type: application/pdf;
name="AnalysisMacleanNetSurvey.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="AnalysisMacleanNetSurvey.pdf"

The result is that the problem has been solved and the pdf files now attach correctly and do not appear as gobbledgook inline.

Many thanks to you both – I am a bit of a “scaredycat” when it comes to doing this sort of thing but your hand-holding has been really helpful. Many, many, thanks.

Alasdair
rsx11m
Moderator
Posts: 14404
Joined: May 3rd, 2007, 7:40 am
Location: US

Re: Seamonkey sending pdf inline rather than as attachment

Post by rsx11m »

You are welcome. So, makaiguy was apparently on the better track - the text/pdf entry was overriding the correct application/pdf type and caused the attachment to be sent as "text" which can be shown "inline".
User avatar
makaiguy
Posts: 16878
Joined: November 18th, 2002, 6:44 pm
Location: Somewhere in SE USA
Contact:

Re: Seamonkey sending pdf inline rather than as attachment

Post by makaiguy »

You know what they say.. even a blind pig can find an acorn sometimes.
Glad we were able to steer you in the right direction.
Doug Wilson
Win10 64bit: FF 115.0.02 64bit, TB 102.12.0 32-bit ║ Android 13/10: FF 115.2.0/115.0.1 ║ No TB for Android available, dammit!
What a fool believes he sees, no wise man has the power to reason away - Doobie Brothers
AndyPapp
Guest

Re: Seamonkey sending pdf inline rather than as attachment

Post by AndyPapp »

Hi,
I have been using Mozilla Suite 1.7.12 on my mac osx 10.3.9 for years without any problem, until yesterday when it started treating pdf files as inline text and thus they were not being sent as attachments. Simultaneously, a problem came up where these pdf files that were attached wrong caused an error giving the dialog "There was an error copying the message to the Sent folder. Retry?"
Upgrading from Mozilla Suite to Sea Monkey 1.1.19 got around the error copying these to the Sent folder, but not the original problem of the Mime type being wrong for PDF file attachments. It took many hours of web searching before I found your excellent post, so I am replying to it with lots of keywords that would have helped me find it sooner.

You pinpointed the problem perfectly. Something went wrong with my mimetypes.rdf file. I moved it out of my profile folder so that a new one would be automatically generated when I restarted Mozilla or Seamonkey. It did, and it solved the problem!!! Now pdf files are attaching properly again! Yeay and Thank you!!!!
User avatar
LIMPET235
Moderator
Posts: 39936
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Re: Seamonkey sending pdf inline rather than as attachment

Post by LIMPET235 »

That's good news.
Now locking this old thread.
[Ancient Amateur Astronomer.]
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.

(Always choose the "Custom" Install.)
Locked