Ask a Question related to ASP Components, Design and Development.
-
robert.l.jones@gmail.com #1
CDO.AddAttachment Problem
I have a .ASP page that allows users to upload a file to a SQL Server
database in Image format. From there, I have a VB6 application that
queries this table, writes the file using ADODB.Stream, and attaches
the document to an email using objMail.AddAttachment. This works fine
75% of the time.
Occassionally, I encounter a problem where the email looks like the
following:
Date: Fri, 24 Feb 2006 06:28:21 -0600
Message-ID: <000601c6393d$cc889810$28b4040a@mysite.com>
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0007_01C6390B.81EE2810"
X-Mailer: Microsoft CDO for Windows 2000
Thread-Index: AcY5Pcxp2seUW02LSL2g0g7LH/bzDQ==
Content-Class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
X-OriginalArrivalTime: 24 Feb 2006 12:28:21.0596 (UTC)
FILETIME=[CCA791C0:01C6393D]
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C6390B.81EE2810
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0008_01C6390B.81EE2810"
------=_NextPart_001_0008_01C6390B.81EE2810
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
MESSAGE BODY
------=_NextPart_001_0008_01C6390B.81EE2810
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
MESSAGE BODY
------=_NextPart_001_0008_01C6390B.81EE2810--
------=_NextPart_000_0007_01C6390B.81EE2810
Content-Type: application/octet-stream;
name="filename.xls"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="filename.xls"
0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAAEAAAAAQAAAAAAAAAA
EAAAbwEAAAQAAAD+////AAAAAAAAAABiAAAA4wAAAIABAAD/////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////9
////bgEAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACw AAAAwAAAANAAAADgAAAA8A
AAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAA AZAAAAGgAAABsAAAAcAAAAHQAA
AB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACQAAAAlAAAAJgAAAC cAAAAoAAAAKQAAACoAAAArAAAA
LAAAAC0AAAAuAAAALwAAADAAAAAxAAAAMgAAADMAAAA0AAAANQ AAADYAAAA3AAAAOAAAADkAAAA6
AAAAOwAAADwAAAA9AAAAPgAAAD8AAABAAAAAQQAAAEIAAABDAA AARAAAAEU
....
....
....
Any ideas why some emails are corrupted and some are not?
Thanks,
Robert
robert.l.jones@gmail.com Guest
-
contribute problem - access denied file may not existpermission problem
Recieving the following error message - "access denied file may not exist , or there could be a permission problem" this happened this morning ,... -
Problem playing Quicktime thru .DCR embedded in HTML - pathreferencing problem?
Greetings earthlings and Director heads. Here's the problem: created an HTML file containing shockwave (dcr) movie that calls quicktime movies in... -
Uploading problem = weird warning (was: access denied problem.....)
Hi, I had a problem where my upload form was not working on our production server but was working on two other servers, after checking the... -
#21611 [Opn]: Problem with version_compare() (Was: Problem with pear cli and release numbers)
ID: 21611 Updated by: et@php.net -Summary: Problem with pear cli and release numbers Reported By: jan at horde... -
Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)
HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on my laptop which has Windows XP. I... -
Anthony Jones #2
Re: CDO.AddAttachment Problem
0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAAEAAAAAQAAAAAAAAAA>
> ------=_NextPart_000_0007_01C6390B.81EE2810
> Content-Type: application/octet-stream;
> name="filename.xls"
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment;
> filename="filename.xls"
>
>EAAAbwEAAAQAAAD+////AAAAAAAAAABiAAAA4wAAAIABAAD/////////////////////////////>////////////////////////////////////////////////////////////////////////////>////////////////////////////////////////////////////////////////////////////>////////////////////////////////////////////////////////////////////////////>////////////////////////////////////////////////////////////////////////////>////////////////////////////////////////////////////////////////////////////>////////////////////////////////////////////////////////////////////////////>///////////////////////////////////////////////////////////////////////////9>////bgEAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACw AAAAwAAAANAAAADgAAAA8A>AAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAA AZAAAAGgAAABsAAAAcAAAAHQAA>AB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACQAAAAlAAAAJgAAAC cAAAAoAAAAKQAAACoAAAArAAAA>LAAAAC0AAAAuAAAALwAAADAAAAAxAAAAMgAAADMAAAA0AAAANQ AAADYAAAA3AAAAOAAAADkAAAA6>What makes you think this is corrupted. Looks like correct base64 encoding> AAAAOwAAADwAAAA9AAAAPgAAAD8AAABAAAAAQQAAAEIAAABDAA AARAAAAEU
> ...
> ...
> ...
> Any ideas why some emails are corrupted and some are not?
>
> Thanks,
> Robert
to me
Anthony.
Anthony Jones Guest
-
robert.l.jones@gmail.com #3
Re: CDO.AddAttachment Problem
This is supposed to be a .xls attachment. I don't understand why when
I use objEmail.AddAttachment it writes the file to the email body like
this.
robert.l.jones@gmail.com Guest
-
Anthony Jones #4
Re: CDO.AddAttachment Problem
<robert.l.jones@gmail.com> wrote in message
news:1141937164.149688.27780@i39g2000cwa.googlegro ups.com...This header:-> This is supposed to be a .xls attachment. I don't understand why when
> I use objEmail.AddAttachment it writes the file to the email body like
> this.
>
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0007_01C6390B.81EE2810"
Says that the body of the email has mutliple parts. Each part is seperated
by the boundary value ----=_NextPart_000_0007_01C6390B.81EE2810
then:-
------=_NextPart_000_0007_01C6390B.81EE2810
Content-Type: application/octet-stream;
name="filename.xls"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="filename.xls"
This indicates that a new bodypart is about to begin. The headers show that
the part is encoded as base64 and is an attachment with the nominal file
name of filename.xls.
It all seems to be in order.
Anthony.
Anthony Jones Guest
-
robert.l.jones@gmail.com #5
Re: CDO.AddAttachment Problem
If all is in order, then why isn't the document attached to the email
rather than being written to the body?
robert.l.jones@gmail.com Guest
-
robert.l.jones@gmail.com #6
Re: CDO.AddAttachment Problem
If all is in order, then why isn't the document attached to the email
rather than being written to the body?
robert.l.jones@gmail.com Guest
-
Anthony Jones #7
Re: CDO.AddAttachment Problem
<robert.l.jones@gmail.com> wrote in message
news:1141946999.290924.225180@p10g2000cwp.googlegr oups.com...Robert,> If all is in order, then why isn't the document attached to the email
> rather than being written to the body?
>
An SMTP mail message is utlimately a simple stream of of bytes.
This message is a mime multipart message.
The document IS attached. What I described to you is how attachments work
in an mime multipart messages.
What were you expecting it to look like?
Anthony.
Anthony Jones Guest
-
robert.l.jones@gmail.com #8
Re: CDO.AddAttachment Problem
The message should just contain the email body with a document attached
and the standard link to download the attachment. These messages do
not have a link to download the attachment. Instead, the attachment is
written to the body in base64. The email body contains all of the MIME
header information. How do I make it quit doing that?? When these
messages are received, they just look like a bunch of base64 garbage
and not an actual document.
This is actually in the message body!
0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAAEAAAAAQAAAAAAAAAA
EAAAbwEAAAQAAAD+////AAAAAAAAAABiAAAA4wAAAIABAAD/////////////////////////////
robert.l.jones@gmail.com Guest
-
robert.l.jones@gmail.com #9
Re: CDO.AddAttachment Problem
I think I've found the problem. There was a line-feed at the end of my
subject.
robert.l.jones@gmail.com Guest
-
Anthony Jones #10
Re: CDO.AddAttachment Problem
<robert.l.jones@gmail.com> wrote in message
news:1142012042.201447.102590@v46g2000cwv.googlegr oups.com...Ahh I see. I thought you were showing the raw data but you were actually> I think I've found the problem. There was a line-feed at the end of my
> subject.
>
showing us the what an email program thought was the body.
Anthony Jones Guest



Reply With Quote

