Which group

Discussion in 'ASP General' started by MikeR, Jan 15, 2007.

  1. MikeR

    MikeR Guest

    Anyone know a group to submit a CDONTS question to?
    Thanks, Mike
    MikeR, Jan 15, 2007
    #1
    1. Advertising

  2. 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], Jan 15, 2007
    #2
    1. Advertising

  3. MikeR

    MikeR Guest

    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/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 = ""
    objMail.To = ""
    objMail.BCC = ""
    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;&H00000000

    [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;&H00000000

    [Workspace]
    £«q2Ó7šV9é¨Ö[æaeJ}Q‡ÊÐx[lŸ³IZÓ¼cÌó¾K»µ–ƒö„zI‡ƒ´±ï¸ÝŽ9QZõO¦è¶Jú cö´YIAôÍ›v¥âÁÇjp£«q2Ó7šV9é¨Ö[æaeJ}Q‡ÊÐx[lŸ³IZÓ¼cÌó¾K»µ–ƒö„zI‡ƒ´±ï¸ÝŽ9QZõO¦è¶Jú cö´YIAôÍ›v¥âÁÇjp£«q2Ó7šV9é¨Ö[æaeJ}Q‡ÊÐx[lŸ³IZÓ¼cÌó¾K»µ–ƒö„zI‡ƒ´±ï¸ÝŽ9QZõO¦è¶Jú cö´YIAôÍ›v¥âÁÇjp£«q2Ó7šV9é¨Ö[æaeJ}Q‡ÊÐx[lŸ³IZÓ¼cÌó¾K»µ–ƒö„zI‡ƒ´±ï¸ÝŽ9QZõO¦è¶Jú cö´YIAôÍ›v¥âÁÇjp£«q2Ó7šV9é¨Ö[æaeJ}Q‡ÊÐx[lŸ³IZÓ¼cÌó¾K»µ–ƒö„zI‡ƒ´±ï¸ÝŽ9QZõO¦è¶Jú cö´YIAôÍ›v¥âÁÇjp£«q2Ó7šV9é¨Ö[æ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;&H00000000

    [Workspace]
    YYYYˆ
    \
    é º k YYYYÝ
    Ê
    ·
    @
    -
    
    £ } j ó à Í º C 0 
    ÷

    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 ó à Í º C 0 
    ÷

    m
    Z
    G
    Y
    MikeR, Jan 15, 2007
    #3
  4. 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.
    Bob Barrows [MVP], Jan 15, 2007
    #4
  5. 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
    Daniel Crichton, Jan 16, 2007
    #5
  6. MikeR

    MikeR Guest

    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, Jan 16, 2007
    #6
  7. MikeR

    MikeR Guest

    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
    MikeR, Jan 16, 2007
    #7
  8. 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, Jan 17, 2007
    #8
  9. MikeR

    Mike Brind Guest

    "Daniel Crichton" <> wrote in message
    news:%...

    <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
    Mike Brind, Jan 17, 2007
    #9
  10. Mike wrote on Wed, 17 Jan 2007 10:46:14 -0000:

    >
    > "Daniel Crichton" <> wrote in message news:%...
    >
    > <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.
    >



    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, Jan 17, 2007
    #10
  11. MikeR

    MikeR Guest

    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
    MikeR, Jan 22, 2007
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Akaketwa
    Replies:
    1
    Views:
    4,821
    impaler
    Sep 22, 2006
  2. Replies:
    0
    Views:
    490
  3. christopher taylor
    Replies:
    0
    Views:
    388
    christopher taylor
    Sep 17, 2008
  4. cpld-fpga-asic
    Replies:
    13
    Views:
    1,169
    rickman
    Jul 6, 2009
  5. Dag Sunde
    Replies:
    0
    Views:
    103
    Dag Sunde
    Nov 18, 2005
Loading...

Share This Page