MozillaZine

Seamonkey sending pdf inline rather than as attachment

User Help for Seamonkey and Mozilla Suite
AlasdairWhite
Guest
 

Post Posted October 15th, 2008, 5:42 am

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

makaiguy

User avatar
 
Posts: 15702
Joined: November 18th, 2002, 6:44 pm
Location: Somewhere in SE USA

Post Posted October 15th, 2008, 7:22 am

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, "The Makai Guy"
Win7 Home Prem (64bit): FF 39.0, TB 38.1.0 ║ Android 4.2.2/4.4.2: FF 9.0, no Android TB available, dammit!
What a fool believes he sees, no wise man has the power to reason away - Doobie Brothers

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

Post Posted October 15th, 2008, 11:44 am

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
 

Post Posted October 16th, 2008, 9:58 am

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: 13921
Joined: May 3rd, 2007, 7:40 am
Location: US

Post Posted October 16th, 2008, 11:52 am

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".

makaiguy

User avatar
 
Posts: 15702
Joined: November 18th, 2002, 6:44 pm
Location: Somewhere in SE USA

Post Posted October 16th, 2008, 2:48 pm

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, "The Makai Guy"
Win7 Home Prem (64bit): FF 39.0, TB 38.1.0 ║ Android 4.2.2/4.4.2: FF 9.0, no Android TB available, dammit!
What a fool believes he sees, no wise man has the power to reason away - Doobie Brothers

AndyPapp
Guest
 

Post Posted May 20th, 2010, 12:48 am

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!!!!

LIMPET235
Moderator

User avatar
 
Posts: 34618
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Post Posted May 20th, 2010, 5:35 am

That's good news.
Now locking this old thread.
Ancient Amateur Astronomer
Win-7-HP/Intel® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-30.0-36.0.1-38/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.5.0.
RadioYachting. Conficker Test.

Return to SeaMonkey Support


Who is online

Users browsing this forum: No registered users and 1 guest