cdonts names for attachments

Discussion in 'ASP General' started by Chris Kennedy, Jan 23, 2004.

  1. I have a web application which saves files to a server and emails the file
    as an attachment. I generate a unique name for each file by concatenating a
    unique numeric string so the file name is unique and cannot be accidentally
    be overwritten. I also store the original name of the file. Is there any way
    to rename the attachment when I send it so it doesn't have the unique name
    but rather the orignal one.
    Chris Kennedy, Jan 23, 2004
    #1
    1. Advertising

  2. CDO/CDONTS do not support renaming attachments, there is only one argument
    relevant here (path/filename). The two other arguments deal with embedded
    messages. Also, if you are using CDONTS, I strongly recommend you migrate
    your code to use CDO.Message (see http://www.aspfaq.com/2026).

    Some of the other mail objects might support renaming, or to continue using
    CDO, just create a unique folder name, copy the file there using FSO, rename
    it to the original name, attach that, then delete it.

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "Chris Kennedy" <> wrote in message
    news:...
    > I have a web application which saves files to a server and emails the file
    > as an attachment. I generate a unique name for each file by concatenating

    a
    > unique numeric string so the file name is unique and cannot be

    accidentally
    > be overwritten. I also store the original name of the file. Is there any

    way
    > to rename the attachment when I send it so it doesn't have the unique name
    > but rather the orignal one.
    >
    >
    Aaron Bertrand - MVP, Jan 23, 2004
    #2
    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. codewarrior
    Replies:
    0
    Views:
    527
    codewarrior
    May 4, 2009
  2. Peter Green
    Replies:
    0
    Views:
    639
    Peter Green
    Nov 5, 2009
  3. Meya

    multiple attachments using CDONTS

    Meya, Mar 3, 2004, in forum: ASP General
    Replies:
    0
    Views:
    97
  4. coenve

    CDO/CDONTS and truncated attachments

    coenve, Jun 3, 2004, in forum: ASP General
    Replies:
    2
    Views:
    116
    HernĂ¡n Castelo
    Jun 3, 2004
  5. Jason Steeves

    CDONTS - no attachments

    Jason Steeves, Oct 5, 2005, in forum: ASP General
    Replies:
    4
    Views:
    110
    Bullschmidt
    Oct 5, 2005
Loading...

Share This Page