Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Avoiding empty ATT*.txt attachments (email sent using SMTP, not from Outlook)

645 views
Skip to first unread message

Stephane Barizien

unread,
Sep 11, 2007, 5:11:33 AM9/11/07
to
I'm sending email messages with attachments (from a Korn Shell script, using
MKS's smtpmail, FWIW) using a SMTP transaction to our Exchange server and a
message contents of:

From: "Stephane Barizien" <stephane...@oce.com>
To: , "Stephane Barizien" <stephane...@oce.com>
MIME-Version: 1.0
Content-Type: Multipart/Mixed; boundary=Message-Boundary-400418939
Subject: Output from: printfiles -D -m sba ../man/man1/printfiles.1
Date: Tue Sep 11 10:49:27 RST 2007

--Message-Boundary-400418939
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: Quoted-printable
Content-description: Mail message body

This message is used to transport the output from:

printfiles -D -m sba ../man/man1/printfiles.1

as an attachment.

--Message-Boundary-400418939
Content-type: application/octet-stream; name="printfiles.pdf"; type=Binary
Content-transfer-encoding: BASE64

JVBERi0xLjQNJeLjz9MNCjYgMCBvYmoNPDwvTGluZWFyaXplZCAxL0wgMTUyNTYvTyA4L0UgMTEz
NjkvTiAxL1QgMTUwOTAvSCBbIDYzNiAxNjddPj4NZW5kb2JqDSAgICAgICAgICAgICAgICAgICAg
DQp4cmVmDQo2IDE3DQowMDAwMDAwMDE2IDAwMDAwIG4NCjAwMDAwMDA4MDMgMDAwMDAgbg0KMDAw
[stuff deleted]
MDAwMDAgbg0KMDAwMDAxMTQ3OCAwMDAwMCBuDQowMDAwMDE0OTI3IDAwMDAwIG4NCnRyYWlsZXIN
Cjw8L1NpemUgNj4+DQpzdGFydHhyZWYNCjExNg0KJSVFT0YNCg==

--Message-Boundary-400418939

The message arrives OK, with the attached PDF files, but also with a
useless, empty, 268-byte ATTnnnnnn.txt attachment.

How do I get this of this?

TIA


Stephane Barizien

unread,
Sep 12, 2007, 4:39:57 PM9/12/07
to

"Stephane Barizien" <steNphOane...@oAcMe.com> a écrit dans le
message de news: %23VGIBPF...@TK2MSFTNGP02.phx.gbl...

Of course, I meant

"How do I get RID of this?"

;-)

>
> TIA
>
>


John Fullbright

unread,
Sep 12, 2007, 5:53:06 PM9/12/07
to
1. The pdf attachment is missing the content-disposition header. This
causes the attachment name to be incorrectly matched resulting in the extra
blank attachment.

2. You're also not using the right content-type for the attachment. If it
were Exchange doing the sending, I'd say you need to add a MIME mapping.
For the PDF attachment, your content-type is application/octet-stream. It
should be application/pdf.

BTW: This will cause issues with Outlook or OWA attachment security.
application/octet-stream basically means unknown content type. When you
click on the attachment, you won't be able to open it directly in a browser
or outlook. You'll be forced to save it. See:
http://support.microsoft.com/kb/873138/en-us


John


"Stephane Barizien" <steNphOane...@oAcMe.com> wrote in message
news:%23VGIBPF...@TK2MSFTNGP02.phx.gbl...

Stephane Barizien

unread,
Sep 14, 2007, 5:50:50 AM9/14/07
to
Hi John;

Thx for the feedback.

With

From: "Stephane Barizien" <stephane...@oce.com>
To: "Stephane Barizien" <stephane...@oce.com>
MIME-Version: 1.0

Content-Type: multipart/mixed; boundary=Message-Boundary-423623539
Subject: Output from: printfiles -D -m sba printfiles.ksh
Date: Fri Sep 14 11:47:29 RST 2007

This is a multi-part message in MIME format.

--Message-Boundary-423623539
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
Content-description: Mail message body

This message is used to transport the output from:

printfiles -D -m sba printfiles.ksh

as an attachment.

P.S. Please ignore any extraneous ATT*.TXT attachment(s).

--Message-Boundary-423623539
Content-type: application/pdf; name="printfiles.pdf"
Content-transfer-encoding: BASE64
Content-disposition: attachment; filename="printfiles.pdf"

JVBERi0xLjQNJeLjz9MNCjMwIDAgb2JqDTw8L0xpbmVhcml6ZWQgMS9MIDQ2NjM2L08gMzIvRSAx
OTUwNy9OIDcvVCA0NTk4OS9IIFsgODM2IDI4MF0+Pg1lbmRvYmoNICAgICAgICAgICAgICAgICAg
[...]
MDAwMDAgbg0KMDAwMDA0MDk0MCAwMDAwMCBuDQowMDAwMDQxNzAzIDAwMDAwIG4NCjAwMDAwNDE3
OTMgMDAwMDAgbg0KMDAwMDA0MTgyOSAwMDAwMCBuDQowMDAwMDQxODY1IDAwMDAwIG4NCjAwMDAw
NDE5MDEgMDAwMDAgbg0KMDAwMDA0MTkzNyAwMDAwMCBuDQowMDAwMDQxOTc0IDAwMDAwIG4NCjAw
MDAwNDIwMTIgMDAwMDAgbg0KMDAwMDA0MjA0MyAwMDAwMCBuDQowMDAwMDQyMTM1IDAwMDAwIG4N
CjAwMDAwNDU3NzkgMDAwMDAgbg0KdHJhaWxlcg0KPDwvU2l6ZSAzMD4+DQpzdGFydHhyZWYNCjEx
Ng0KJSVFT0YNCg==

--Message-Boundary-423623539

I get the exact same results...

Note: even without application/pdf I have never seen the problem you mention
with attachment security -- maybe because of Outlook's configuration?

Stephane Barizien

unread,
Sep 25, 2007, 10:49:17 AM9/25/07
to
Any other idea?

Piotr ABda

unread,
Dec 3, 2011, 4:30:32 PM12/3/11
to
Hi

sorry for my english.
You just forgot the lasts "--" after the last boundary :

at the end of mail :

--Message-Boundary-423623539
must be
--Message-Boundary-423623539--

maybe it will help.
>> On Wednesday, September 12, 2007 4:39 PM Stephane Barizien wrote:

>> Of course, I meant
>>
>> "How do I get RID of this?"
>>
>> ;-)


>>> On Wednesday, September 12, 2007 5:53 PM John Fullbright wrote:

>>> 1. The pdf attachment is missing the content-disposition header. This
>>> causes the attachment name to be incorrectly matched resulting in the extra
>>> blank attachment.
>>>
>>> 2. You're also not using the right content-type for the attachment. If it
>>> were Exchange doing the sending, I'd say you need to add a MIME mapping.
>>> For the PDF attachment, your content-type is application/octet-stream. It
>>> should be application/pdf.
>>>
>>> BTW: This will cause issues with Outlook or OWA attachment security.
>>> application/octet-stream basically means unknown content type. When you
>>> click on the attachment, you won't be able to open it directly in a browser
>>> or outlook. You'll be forced to save it. See:
>>> http://support.microsoft.com/kb/873138/en-us
>>>
>>>
>>> John
>>>
>>>
>>>
>>>
>>> "Stephane Barizien" <steNphOane...@oAcMe.com> wrote in message
>>> news:%23VGIBPF...@TK2MSFTNGP02.phx.gbl...


0 new messages