Which group
am 15.01.2007 16:21:44 von MikeRAnyone know a group to submit a CDONTS question to?
Thanks, Mike
Anyone know a group to submit a CDONTS question to?
Thanks, Mike
MikeR wrote:
> Anyone know a group to submit a CDONTS question to?
> Thanks, Mike
I suppose it depends on the context. If you are using it in code being
processed by ASP, then this is the right location.
I know of no group set up specifically for CDONTS questions.
Incidentally, CDONTS is obsolete. See
http://classicasp.aspfaq.com/email/how-do-i-send-e-mail-with -cdo.html
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows [MVP] wrote:
> I suppose it depends on the context. If you are using it in code being
> processed by ASP, then this is the right location.
> I know of no group set up specifically for CDONTS questions.
> Incidentally, CDONTS is obsolete. See
> http://classicasp.aspfaq.com/email/how-do-i-send-e-mail-with -cdo.html
Thanks, Bob.
I have an asp page which e-mails an updated Access db to a couple of people. One
of them uses Outlook, and it refuses an .mdb file, so I'm renaming the file to a
..txt extension. As you see, I've switched to CDO and the problem is the same.
Here's a little test page (sorry for the wrapping):
Set fso = CreateObject("Scripting.FileSystemObject")
fso.MoveFile Server.Mappath("\db\My_DB.mdb"), Server.Mappath("\db\My_DB.txt")
Set objMail = Server.CreateObject("CDO.Message")
ObjMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
ObjMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver" ) ="mail.yoursite.com"
ObjMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverp ort") = 25
ObjMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpusessl" ) = False
ObjMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpconnect iontimeout") = 60
objMail.From = "DB_Robot@mydomain.com"
objMail.To = "person1@comcast.net"
objMail.BCC = "person2@comcast.net"
objMail.Subject = "Yesterday's Updates Table as .txt"
objMail.TextBody = "Here it is with a .txt extension"
objMail.AddAttachment(Server.MapPath("/db/My_DB.txt"))
objMail.Send
Set objMail = nothing
fso.MoveFile Server.Mappath("\db\My_DB.txt"), Server.Mappath("\db\My_DB.mdb")
If I rename the .mdb, this appears in the e-mail body following what looks like
an HTML horizontal line. I I just send it as a .mdb, it doesn't have the "goo"
as outlined below.
Mike
YY=
t
ã¥=(00ÿÿÿÿ
If I hit the reply button additional characters are exposed:
Y=
t
ã¥=(00ÿÿÿÿName="qsl_updates"
HelpContextID="0"
VersionCompatible32="393222000"
CMG="4042A82EAC2EAC2EAC2EAC"
DPB="8082686B696B696B"
GC="C0C228AB29AB2954"
[Host Extender Info]
&H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H0000 0000
[Workspace]
YYYYYYYÿÿÿÿÿÿÿÿÿÿ
N
Ä:õ°k&á
W
Í C þ¹t/ê¥=
t
ã¥=(00ÿÿÿÿName="qsl_updates"
HelpContextID="0"
VersionCompatible32="393222000"
CMG="4042A82EAC2EAC2EAC2EAC"
DPB="8082686B696B696B"
GC="C0C228AB29AB2954"
[Host Extender Info]
&H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H0000 0000
[Workspace]
£«q2Ó7V9é¨Ö[æaeJ}QÊÐx[l³IZÓ¼cÌó¾K»µözI´ ±ï¸Ý9QZõO¦è¶Júcö´YIAôÍv¥âÁÇjp£«q2Ó7V9é¨Ö[æaeJ} QÊÐx[l³IZÓ¼cÌó¾K»µözI´±ï¸Ý9QZõO¦è¶Júcö´YI AôÍv¥âÁÇjp£«q2Ó7V9é¨Ö[æaeJ}QÊÐx[l³IZÓ¼cÌó¾K»µ özI´±ï¸Ý9QZõO¦è¶Júcö´YIAôÍv¥âÁÇjp£«q2Ó7V9é ¨Ö[æaeJ}QÊÐx[l³IZÓ¼cÌó¾K»µözI´±ï¸Ý9QZõO¦è¶ Júcö´YIAôÍv¥âÁÇjp£«q2Ó7V9é¨Ö[æaeJ}QÊÐx[l³IZÓ¼c Ìó¾K»µözI´±ï¸Ý9QZõO¦è¶Júcö´YIAôÍv¥âÁÇjp£« q2Ó7V9é¨Ö[æaeJ}QÊÐx[l³IZÓ¼cÌó¾K»µöL# ÿÿÿÿÿÿÿÿÿÿÿZ
ý´gÍß
~
)
È o
m
Z
G
Ð ½ ª ÿ=
t
ã¥=(00ÿÿÿÿÿÿÿÿÿÿName="qsl_updates"
HelpContextID="0"
VersionCompatible32="393222000"
CMG="4042A82EAC2EAC2EAC2EAC"
DPB="8082686B696B696B"
GC="C0C228AB29AB2954"
[Host Extender Info]
&H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H0000 0000
[Workspace]
YYYY
\
éºkYYYYÝ
Ê
·
@
-
£}jóàͺC0
÷
m
Z
G
Ð ½ ª
øn÷äÑZG4½ª
YYLòìpÓ¦£Ï«=¹~þÏÕÓðpLòìpÓ¦£Ï«=¹~þÏÕÓ ðpLòìpÓ¦£Ï«=¹~þÏÕÓðpLòìpÓ¦£Ï«=¹~þÏÕÓðpUª-4° }È
LòìpÓ¦£Ï«=¹~þÏÕÓðpLòìpÓ¦£Ï«=¹~þÏÕÓðpUª-4°}È
LòìpÓ¦£Ï«=¹~þÏÕÓðpLòìpÓ¦£Ï«=¹~þÏÕÓðpUª-4°}È
LòìpÓ¦£Ï«=¹~þÏÕÓðpLòìpÓ¦£Ï«=¹~þÏÕÓðpLòìpÓ ¦£Ï«=¹~þÏÕÓðpLòìpÓ¦£Ï«=¹~þÏÕÓðpLòìpÓ¦£Ï«=¹ ~þÏÕÓðpLòìpÓ¦£Ï«=¹~þÏÕÓðpLòìpÓ¦£Ï«=¹~þÏÕÓ ðpLòìpÓ¦£Ï«=¹~þÏÕÓðpLòìpÓ¦£Ï«=¹~þÏÕÓðpLòì pÓ¦£Ï«=¹~þÏÕÓðpUª-4°}È
LòìpÓ¦£Ï«=¹~þÏÕÓðpR zð
Ý
Ê
·
@
-
£}jóàͺC0
÷
m
Z
G
Y
MikeR wrote:
> Bob Barrows [MVP] wrote:
>> I suppose it depends on the context. If you are using it in code
>> being processed by ASP, then this is the right location.
>> I know of no group set up specifically for CDONTS questions.
>> Incidentally, CDONTS is obsolete. See
>> http://classicasp.aspfaq.com/email/how-do-i-send-e-mail-with -cdo.html
> Thanks, Bob.
> I have an asp page which e-mails an updated Access db to a couple of
> people. One
> of them uses Outlook, and it refuses an .mdb file, so I'm renaming
> the file to a .txt extension.
Have you considered zipping the file instead?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
MikeR wrote on Mon, 15 Jan 2007 15:13:25 -0500:
> Bob Barrows [MVP] wrote:
>> I suppose it depends on the context. If you are using it in code being
>> processed by ASP, then this is the right location.
>> I know of no group set up specifically for CDONTS questions.
>> Incidentally, CDONTS is obsolete. See
>> http://classicasp.aspfaq.com/email/how-do-i-send-e-mail-with -cdo.html
> Thanks, Bob.
> I have an asp page which e-mails an updated Access db to a couple of
> people. One of them uses Outlook, and it refuses an .mdb file, so I'm
> renaming the file to a .txt extension. As you see, I've switched to CDO
> and the problem is the same. Here's a little test page (sorry for the
> wrapping):
Have you checked the raw message to see how the attachment is being added?
Outlook will assume that the .txt extension means it's text (and also look
at the MIME headers which likely say it's a text attachment which CDO adds
because the extension is .txt) and so displays it as inline text after a
line in the message body. As Bob has suggested, ZIP the file and send that
as an attachment instead, or get the user to adjust their Outlook settings
to allow mdb files (it should be a simple registry change)
Dan
Bob Barrows [MVP] wrote:
>
> Have you considered zipping the file instead?
No I haven't, but I'll check with my hosting company to see if the have a
zip tool.
I use Thunderbird as a mail client, so maybe the problem is there. The effect
doesn't happen in outlook.
Thanks, Mike
MikeR wrote on Tue, 16 Jan 2007 18:26:30 -0500:
> Hi Dan -
> Thanks for your response.
> Daniel Crichton wrote:
>> Have you checked the raw message to see how the attachment is being
>> added?
> I don't know how to do that.
>> Outlook will assume that the .txt extension means it's text (and also
>> look at the MIME headers which likely say it's a text attachment which
>> CDO adds because the extension is .txt) and so displays it as inline text
>> after a line in the message body. As Bob has suggested, ZIP the file and
>> send that as an attachment instead, or get the user to adjust their
>> Outlook settings to allow mdb files (it should be a simple registry
>> change)
> It's not a problem with my Outlook user I just found out today. I use
> Thunderbird. I did another test run just befor reading the newsgroup, and
> the body of the e-mail contains
>
> The original MIME headers for this attachment are:
> Content-Type: text/plain;
> name="MyDB.txt"
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment;
> filename="MyDB.txt"
> instead of the original squigglygoop. Does this tell you anything?
> As it's only occuring on my machine, I can live with it, but curiosity
> compels me to keep trying to find a reason.
> Mike
CDO uses the extension to determine the MIME mapping. By changing the
extension to .txt CDO has no choice but to add the text/plain content type,
because it has no idea that the content of the file is not text. If you gave
it a different extension that was unknown, or a binary data type, it might
help (say .xxx) as that should result in something like
application/octet-stream. Zipping is probably the best option - it
compresses the data (although an MDB doesn't tend to compress well unless it
hasn't been compacted for a while) and will be handled correctly when it's
received without the recipient having to mess around renaming files.
Dan
"Daniel Crichton"
news:%23b0KuShOHHA.4604@TK2MSFTNGP06.phx.gbl...
Zipping is probably the best option - it
> compresses the data (although an MDB doesn't tend to compress well unless
> it hasn't been compacted for a while)
Huh? A recently compacted mdb will generally compress to around 25 - 30% of
it's original size. I just tried a few using nothing more than the Windows
XP compression utility. Common file types that don't compress well are
usually those that already use some kind of compression, such as jpg, gif,
pdf.
--
Mike Brind
Mike wrote on Wed, 17 Jan 2007 10:46:14 -0000:
>
> "Daniel Crichton"
>
>
>
> Zipping is probably the best option - it
>> compresses the data (although an MDB doesn't tend to compress well unless
>> it hasn't been compacted for a while)
>
> Huh? A recently compacted mdb will generally compress to around 25 - 30%
> of it's original size. I just tried a few using nothing more than the
> Windows XP compression utility. Common file types that don't compress well
> are usually those that already use some kind of compression, such as jpg,
> gif, pdf.
>
In my last tests compressing Access 2002 MDB files that had just been
compacted I found in many cases a less than 5% file size reduction using
WinZip 8. However, I will admit that I don't have many MDB files here - most
of our databases are in SQL Server, I use Access purely for prototyping
small databases prior to moving everything to SQL Server.
Dan
Daniel Crichton wrote:
>
> CDO uses the extension to determine the MIME mapping. By changing the
> extension to .txt CDO has no choice but to add the text/plain content type,
> because it has no idea that the content of the file is not text. If you gave
> it a different extension that was unknown, or a binary data type, it might
> help (say .xxx) as that should result in something like
> application/octet-stream. Zipping is probably the best option - it
> compresses the data (although an MDB doesn't tend to compress well unless it
> hasn't been compacted for a while) and will be handled correctly when it's
> received without the recipient having to mess around renaming files.
>
> Dan
Dan - Thanks for the explanation. I'll play with it.
Mike