469,290 Members | 1,806 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

cdonts names for attachments

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.
Jul 19 '05 #1
1 1179
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" <no****@microsoft.com> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
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.

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jason Steeves | last post: by
2 posts views Thread by Anthony Boudouvas | last post: by
2 posts views Thread by =?Utf-8?B?amxvcGVzMTUx?= | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.