cdonts names for attachments

C

Chris Kennedy

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.
 
A

Aaron Bertrand - MVP

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top