Attachment ContentType

Giganews Newsgroups
Subject: Attachment ContentType
Posted by:  Robert Tulloch (tulta…@attglobal.net)
Date: Tue, 15 Mar 2005

Hi:

  When I attach a pdf and an rtf using

TIdAttachment.Create(IdMsgSend.MessageParts, OpenDialog.FileName);

I get:

--=_MoreStuf_2zzz1234sadvnqw3nerasdf
Content-Type: application/octet-stream;
        name="overview.rtf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="overview.rtf"

e1xydGYxXGFuc2lcZGVmZjBcZGVmdGFiNzIwe1xmb250dGJse1xmMFxmc3dpc3MgTVMgU2FucyBT
ZXJpZjt9e1xmMVxmcm9tYW5cZmNoYXJzZXQyIFN5bWJvbDt9e1xmMlxmc3dpc3NcZnBycTIgU3lz

and:

--=_MoreStuf_2zzz1234sadvnqw3nerasdf
Content-Type: application/octet-stream;
        name="blank.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="blank.pdf"

JVBERi0xLjMNJeLjz9MNCjYgMCBvYmoNPDwgDS9MaW5lYXJpemVkIDEgDS9PIDggDS9IIFsgNjkz
IDE3NSBdIA0vTCAxNDAxOCANL0UgMTIyNzkgDS9OIDEgDS9UIDEzNzgxIA0+PiANZW5kb2JqDSAg

When I send asame to myself using netscape I get:

--=_MoreStuf_2zzz1234sadvnqw3nerasdf
Content-Type: application/octet-stream;
        name="overview.rtf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="overview.rtf"

e1xydGYxXGFuc2lcZGVmZjBcZGVmdGFiNzIwe1xmb250dGJse1xmMFxmc3dpc3MgTVMgU2FucyBT
ZXJpZjt9e1xmMVxmcm9tYW5cZmNoYXJzZXQyIFN5bWJvbDt9e1xmMlxmc3dpc3NcZnBycTIgU3lz
dGVtO317XGYzXGZzd2lzc1xmY2hhcnNldDEgQXJpYWw7fXtcZjRcZnN3aXNzIEFyaWFsO317XGY1

And:

--------------070706030707010908050000
Content-Type: application/pdf;
  name="blank.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
  filename="blank.pdf"

JVBERi0xLjMNJeLjz9MNCjYgMCBvYmoNPDwgDS9MaW5lYXJpemVkIDEgDS9PIDggDS9IIFsg
NjkzIDE3NSBdIA0vTCAxNDAxOCANL0UgMTIyNzkgDS9OIDEgDS9UIDEzNzgxIA0+PiANZW5k

Why using NS I get:

Content-Type: application/pdf; <--------------
  name="blank.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
  filename="blank.pdf"

And using:
TIdAttachment.Create(IdMsgSend.MessageParts, OpenDialog.FileName);

I get:

Content-Type: application/octet-stream;  <-----------
        name="blank.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="blank.pdf"

Since both open fine, what is difference and why?

Thanks.

Replies