Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 15th, 2007, 12:48 AM
Registered User
 
Join Date: Sep 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default CDO email attachment encoding fails

I have 2 windows 2000 servers, runing the same code below, but on one of the servers the email is created with the attachment corrupt, The emails are generated the same except on the one that does NOT work it shows
(Content-Transfer-Encoding: quoted-printable)
and the one that works shows
(Content-Transfer-Encoding: base64)

how can the exact same code generate 2 different email attachments? I assume it's a setting on the server? please help

------- THIS IS THE RESULTING EMAIL (NOT WORKING) ----
MIME-Version: 1.0
X-Mailer: Microsoft CDO for Windows 2000
Thread-Index: AcdfRYkOFo9u9U1OT4Ojz4mcFyT4rw==
Content-Class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896
Content-Type: multipart/mixed; boundary="----=_NextPart_000_0065_01C75F13.3E73EAF0"

------=_NextPart_000_0065_01C75F13.3E73EAF0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

=0A=
NOCOVERPAGE:true
------=_NextPart_000_0065_01C75F13.3E73EAF0
Content-Type: application/pdf; name=-234796329.pdf
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="-234796329.pdf"

%PDF-1.2 =0A=
%=E2=E3=CF=D3 =0A=
1 0 obj =0A=
---------------------------- END --------------------------------


----------------- THIS IS THE RESULT EMAIL (WORKING)--------
MIME-Version: 1.0
Date: Wed, 07 Mar 2007 02:57:31 -0500
X-Priority: 3 (normal)
Message-ID: <dimcs5k3njjj558.070320070257@CPosner-S2>
Content-Type: multipart/mixed; boundary="----=_Part_CFD61F1C07AD408"

------=_Part_CFD61F1C07AD408
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

NOCOVERPAGE:true

------=_Part_CFD61F1C07AD408
Content-Type: application/octet-stream; name=-234796329.PDF
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="-234796329.PDF"

JVBERi0xLjIgCiXi48/TIAoxIDAgb2JqIAo8PCAKL1R5cGUgL0NhdGFsb2cgCi9QYWdlc yAyIDAgUiAKL1BhZ2VNb2RlIC9Vc2VOb25lIAovVmlld2VyUHJ lZmVyZW5jZXMgPDwgCi9Ga
----------------------------------- END ------------------------




HERE IS THE CODE THAT WORKS ON 1 SERVER BUT NOT THE OTHER
Set objMail = CreateObject("CDO.Message")
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "x.x.x.x"
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "pass"
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
objMail.Configuration.Fields.Update

objMail.From = "me@domain.COM"
objMail.Subject = SubjectLine
objMail.To = LocationEmail
objMail.TextBody = "NOCOVERPAGE:true"
objMail.AddAttachment strFileName, ExportFileName
objMail.Send()

 
Old March 27th, 2007, 05:28 AM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you send me the code for Email-Attachment.
Regards,
Kunal Shiradkar





Similar Threads
Thread Thread Starter Forum Replies Last Post
error sending email with attachment using CDO archanahs Classic ASP Professional 1 May 25th, 2006 08:16 AM
email an attachment GeoMeskin Javascript 1 December 17th, 2003 04:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.