Home > Archive > ASP > January 2007 > Which group
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Anyone know a group to submit a CDONTS question to?
Thanks, Mike
| |
| Bob Barrows [MVP] 2007-01-15, 6:56 pm |
| 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/...l-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/...l-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/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.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
=(00Name="qsl_updates"
HelpContextID="0"
VersionCompatible32="393222000"
CMG="4042A82EAC2EAC2EAC2EAC"
DPB="8082686B696B696B"
GC="C0C228AB29AB2954"
[Host Extender Info]
&H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000
[Workspace]
YYYYYYY
N
:k&
W
C t/=
t
=(00Name="qsl_updates"
HelpContextID="0"
VersionCompatible32="393222000"
CMG="4042A82EAC2EAC2EAC2EAC"
DPB="8082686B696B696B"
GC="C0C228AB29AB2954"
[Host Extender Info]
&H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000
[Workspace]
q27V9騍[aeJ}Qx[lIZӼc
KzIݎ9QZOJc
YIA͛vjpq27V9騍[aeJ}
Qx[lIZӼcKzIݎ
9QZOJcYIA͛vjpq27
V9騍[aeJ}Qx[lIZӼcK
zIݎ
9QZOJcYIA͛vjpq27
V9騍[aeJ}Qx[lIZӼcK
zIݎ9QZOJcYIA͛
vjpq27V9騍[aeJ}Qx[lI
ZӼcKzIݎ9QZO
JcYIA͛vjpq27V9騍[
aeJ}Qx[lI
ZӼcKL#
Z
g
~
)
o
m
Z
G
=
t
=(00Name="qsl_updates"
HelpContextID="0"
VersionCompatible32="393222000"
CMG="4042A82EAC2EAC2EAC2EAC"
DPB="8082686B696B696B"
GC="C0C228AB29AB2954"
[Host Extender Info]
&H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000
[Workspace]
YYYY
\
kYYYY
@
-
}jC0
m
Z
G
nZG4
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
@
-
}jC0
m
Z
G
Y
| |
| Bob Barrows [MVP] 2007-01-15, 6:56 pm |
| MikeR wrote:
> Bob Barrows [MVP] wrote:
> 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.
| |
| Daniel Crichton 2007-01-16, 7:56 am |
| MikeR wrote on Mon, 15 Jan 2007 15:13:25 -0500:
> Bob Barrows [MVP] wrote:
> 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
| |
|
| 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
| |
| Daniel Crichton 2007-01-17, 3:56 am |
| MikeR wrote on Tue, 16 Jan 2007 18:26:30 -0500:
> Hi Dan -
> Thanks for your response.
> Daniel Crichton wrote:
> I don't know how to do that.
> 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
| |
| Mike Brind 2007-01-17, 7:56 am |
|
"Daniel Crichton" <msnews@worldofspack.com> wrote in message
news:%23b0KuShOHHA.4604@TK2MSFTNGP06.phx.gbl...
<snip>
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
| |
| Daniel Crichton 2007-01-17, 7:56 am |
| Mike wrote on Wed, 17 Jan 2007 10:46:14 -0000:
>
> "Daniel Crichton" <msnews@worldofspack.com> wrote in message news:%23b0KuShOHHA.4604@TK2MSFTNGP06.phx.gbl...
>
> <snip>
>
> Zipping is probably the best option - it
>
> 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
|
|
|
|
|