Community Discussions and Support
PDF attachment content-type

[quote user="David_himself"]

Thanks again.  Sorry if I'm being dumb, but I'm still unclear about the use of application names in mime-map.pm from the point of view of outgoing files, since those names don't seem to appear in the files that are sent, as far as I can see.[/quote]

They are not 'application names', but internal Pegasus Mail attachment types.  From mime-map.pm:

; Each line in the file defines a bi-directional mapping between a MIME
; content type on the left and a Pegasus Mail attachment type on the
; right.
;
; When you add an attachment to a message, WinPMail will look through
; this file looking for an attachment type match; when it finds one, it
; will write the attachment using that MIME content type.

[quote]And shouldn't those two default .pm files be brought up to date in the next release?[/quote]

Perhaps they will.

 

[quote user="David_himself"] <P>Thanks again.  Sorry if I'm being dumb, but I'm still unclear about the use of application names in mime-map.pm from the point of view of outgoing files, since those names don't seem to appear in the files that are sent, as far as I can see.[/quote]</P> <P>They are not 'application names', but internal Pegasus Mail attachment types.  From mime-map.pm:</P> <P>; Each line in the file defines a bi-directional mapping between a MIME ; content type on the left and a Pegasus Mail attachment type on the ; right. ; ; When you add an attachment to a message, WinPMail will look through ; this file looking for an attachment type match; when it finds one, it ; will write the attachment using that MIME content type. </P> <P>[quote]And shouldn't those two default .pm files be brought up to date in the next release?[/quote]</P> <P>Perhaps they will.</P> <P mce_keep="true"> </P>

New to the community, sorry if answer is known. First, thank you very much for Pegasus and this community.

OK, my question. When I attach a PDF to a mail message, it is send with the headers (raw view, the part of my interest in boldface):

Content-type: Application/Octet-stream; name="mm3.ponente.pdf"; type=Acrobat
Content-disposition: attachment; filename="mm3.ponente.pdf"
Content-transfer-encoding: BASE64

I'm not an expert, but shouldn't it be send as "Content-type: Application/pdf"? (http://www.rfc-editor.org/rfc/rfc3778.txt).

Thank you very much in advance. Bye

<p>New to the community, sorry if answer is known. First, thank you very much for Pegasus and this community.</p><p>OK, my question. When I attach a PDF to a mail message, it is send with the headers (raw view, the part of my interest in boldface):</p><p><b>Content-type: Application/Octet-stream</b>; name="mm3.ponente.pdf"; type=Acrobat Content-disposition: attachment; filename="mm3.ponente.pdf" Content-transfer-encoding: BASE64 I'm not an expert, but shouldn't it be send as "Content-type: <b>Application/pdf</b>"? (<a href="http://www.rfc-editor.org/rfc/rfc3778.txt" title="RFC 3778" target="_blank" mce_href="http://www.rfc-editor.org/rfc/rfc3778.txt">http://www.rfc-editor.org/rfc/rfc3778.txt</a>). </p><p>Thank you very much in advance. Bye </p>

I don't know why you never received a response here - it must have been missed.

The method of identification for all attachments depends on the settings in two files:

FILETYPE.PM & MIME-MAP.PM

They both have comments describing their use, but in simple terms filetype.pm contains information which allows Pegasus Mail to determine the internal file type from extension and/or contents for outgoing attachments.  mime-map.pm allows a 2-way mapping of the internal file type to a mime content-type both for outgoing and for incoming attachments.

The default files have not been updated for some time, and that explains why your PDF is attached with the default Octet-stream type - which is not wrong, just not as useful as it could be. To get the correct type you need to add a line to both files:

Acrobat,0,X,0,.pdf                   => this goes into filetype.pm to identify *.PDF files
application/pdf = Acrobat         => this goes into mime-map.pm to show that Acrobat type files should be application/pdf

Don't forget you should edit those files with a plain text editor like notepad, and do it while Pegasus Mail is not running.

<P>I don't know why you never received a response here - it must have been missed.</P> <P>The method of identification for all attachments depends on the settings in two files:</P> <P>FILETYPE.PM & MIME-MAP.PM</P> <P>They both have comments describing their use, but in simple terms filetype.pm contains information which allows Pegasus Mail to determine the internal file type from extension and/or contents for outgoing attachments.  mime-map.pm allows a 2-way mapping of the internal file type to a mime content-type both for outgoing and for incoming attachments.</P> <P>The default files have not been updated for some time, and that explains why your PDF is attached with the default Octet-stream type - which is not wrong, just not as useful as it could be. To get the correct type you need to add a line to both files:</P> <P>Acrobat,0,X,0,.pdf                   => this goes into filetype.pm to identify *.PDF files application/pdf = Acrobat         => this goes into mime-map.pm to show that Acrobat type files should be application/pdf </P> <P mce_keep="true">Don't forget you should edit those files with a plain text editor like notepad, and do it while Pegasus Mail is not running.</P>

This is a fantastic time-saver:  thanks.  On the strength of it I've added the following lines to filetype.pm for attachments that I send all the time:

Acrobat,0,X,0,.pdf
MS-Word2007,0,X,0,.docx
MS-Word,0,X,0,.doc

Is there any problem with that, in particular recognising MS Word files by extension, since previously the filetype had to be manually set?  (I only use the .doc extension for Word 97-2003 files.)  On a quick test it works great.

I am less clear about mime-map.pm but have added these lines

application/pdf = Acrobat
application/doc = MS Word
application/docx = MS Word 2007

As far as I can see, it hasn't made any difference:  .pdf, .doc and .docx files are encoded and received the same way with or without these changes. Again, please advise if I've got this wrong.  Thanks.

David

<p>This is a fantastic time-saver:  thanks.  On the strength of it I've added the following lines to filetype.pm for attachments that I send all the time:</p><p>Acrobat,0,X,0,.pdf MS-Word2007,0,X,0,.docx MS-Word,0,X,0,.doc </p><p>Is there any problem with that, in particular recognising MS Word files by extension, since previously the filetype had to be manually set?  (I only use the .doc extension for Word 97-2003 files.)  On a quick test it works great.</p><p>I am less clear about mime-map.pm but have added these lines </p><p>application/pdf = Acrobat application/doc = MS Word application/docx = MS Word 2007</p><p>As far as I can see, it hasn't made any difference:  .pdf, .doc and .docx files are encoded and received the same way with or without these changes. Again, please advise if I've got this wrong.  Thanks. </p><p>David </p>

[quote user="David_himself"]This is a fantastic time-saver:  thanks.  On the strength of it I've added the following lines to filetype.pm for attachments that I send all the time:

Acrobat,0,X,0,.pdf
MS-Word2007,0,X,0,.docx
MS-Word,0,X,0,.doc

Is there any problem with that, in particular recognising MS Word files by extension, since previously the filetype had to be manually set?  (I only use the .doc extension for Word 97-2003 files.)  On a quick test it works great.[/quote]

Fine - the previous default (which is usually backed up in \pmail\programs\resource) only looks at the first few bytes of the file.

[quote]I am less clear about mime-map.pm but have added these lines

application/pdf = Acrobat
application/doc = MS Word
application/docx = MS Word 2007[/quote]

missing hyphen - you used MS-Word in filetype

 

[quote user="David_himself"]This is a fantastic time-saver:  thanks.  On the strength of it I've added the following lines to filetype.pm for attachments that I send all the time: <P>Acrobat,0,X,0,.pdf MS-Word2007,0,X,0,.docx MS-Word,0,X,0,.doc </P> <P>Is there any problem with that, in particular recognising MS Word files by extension, since previously the filetype had to be manually set?  (I only use the .doc extension for Word 97-2003 files.)  On a quick test it works great.[/quote]</P> <P>Fine - the previous default (which is usually backed up in \pmail\programs\resource) only looks at the first few bytes of the file.</P> <P>[quote]I am less clear about mime-map.pm but have added these lines </P> <P>application/pdf = Acrobat application/doc = MS Word application/docx = MS Word 2007[/quote]</P> <P>missing hyphen - you used MS-Word in filetype</P> <P mce_keep="true"> </P>

Thanks again.  Sorry if I'm being dumb, but I'm still unclear about the use of application names in mime-map.pm from the point of view of outgoing files, since those names don't seem to appear in the files that are sent, as far as I can see.  What does get fixed is the line of the general form

Content-type: application/docx; name="temp.docx"

just after the message boundary.  All the filetypes of interest to me get sent in Base64 encoding.

I'm all for tidiness, but I can't see what effect the precise spelling of the application name has, i.e. why it might be disadvantageous if they don't match exactly in the two files.  My current additions to the default file are

application/pdf = Acrobat
application/docx = MS-Word2007
application/doc = MS-Word
application/fp5 = FileMaker-Pro5-6
application/fp7 = FileMaker-Pro7-
application/pptx = Powerpoint2007
application/ppt = Powerpoint

with corresponding entries in filetype.pm.  I have now adjusted the two files so that all applications match in spelling - just in case!

And shouldn't those two default .pm files be brought up to date in the next release?  I've been manually adjusting the filetype of attachments for years.  Wish I'd known how easy it was to fix globally, or better, that 4.51 had done it for me.

best

David

<p>Thanks again.  Sorry if I'm being dumb, but I'm still unclear about the use of application names in mime-map.pm from the point of view of outgoing files, since those names don't seem to appear in the files that are sent, as far as I can see.  What does get fixed is the line of the general form </p><p>Content-type: application/docx; name="temp.docx" </p><p>just after the message boundary.  All the filetypes of interest to me get sent in Base64 encoding.</p><p>I'm all for tidiness, but I can't see what effect the precise spelling of the application name has, i.e. why it might be disadvantageous if they don't match exactly in the two files.  My current additions to the default file are</p><p>application/pdf = Acrobat application/docx = MS-Word2007 application/doc = MS-Word application/fp5 = FileMaker-Pro5-6 application/fp7 = FileMaker-Pro7- application/pptx = Powerpoint2007 application/ppt = Powerpoint with corresponding entries in filetype.pm.  I have now adjusted the two files so that all applications match in spelling - just in case! </p><p>And shouldn't those two default .pm files be brought up to date in the next release?  I've been manually adjusting the filetype of attachments for years.  Wish I'd known how easy it was to fix globally, or better, that 4.51 had done it for me.</p><p>best</p><p>David </p>
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft