Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > cdonts names for attachments

Reply
Thread Tools

cdonts names for attachments

 
 
Chris Kennedy
Guest
Posts: n/a
 
      01-23-2004
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.


 
Reply With Quote
 
 
 
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      01-23-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mail.Attachments (Multiple Attachments) from Querystring codewarrior ASP .Net 0 05-04-2009 07:19 PM
CDONTS - no attachments Jason Steeves ASP General 4 10-05-2005 09:55 PM
attachments unable to read attachments from email bub.mk Computer Support 1 09-29-2004 02:29 AM
CDO/CDONTS and truncated attachments coenve ASP General 2 06-03-2004 07:37 PM
multiple attachments using CDONTS Meya ASP General 0 03-03-2004 08:05 AM



Advertisments