473,398 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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 1257
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: | last post by:
I did a working code with CDONTS on NT4 Now I am testing is on w2k and it looks like objCDONTS.Send is completely ignored. I think is it ignored because it throws no errors, neither does the...
2
by: coenve | last post by:
Hello, On our previous production server, we used CDONTS to attach jpeg image to the mail. On our new server (both are Win2000) attachments are truncated to ~108B (that's what outlook shows), or...
8
by: Boris | last post by:
Could someone please tell me if I can use CDONTS in W 2003 Server environment to send emails the same way it is used in W2K Server. I have heard that CDONTS is no longer available in W 2003 Server...
2
by: Jammer | last post by:
Can someone give me some sample code to use CDONTS.new to send email with an attachment? I've got sample code from the following website; ...
5
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it...
7
by: Griff | last post by:
I have been using the CDONTS component on Windows 2000 to send emails for a long time now (code below). However, over time, the report that I am sending has got rather longer and it now gives me...
4
by: Jason Steeves | last post by:
I am using cdonts to send mail messages with an attachment. The problem I am having is the messages are going through OK but the attachments are not there. Any ideas? I have tried my code elsewhere...
2
by: Anthony Boudouvas | last post by:
Hi to all, i am just try to send emails in a timer-loop fashion, using the code below and i get the following error message: Could not create 'CDONTS.NewMail' The problem is not happening...
2
by: =?Utf-8?B?amxvcGVzMTUx?= | last post by:
Here the sample code, it fails on the attachment retrieving the file. The file is located on a remote server. The folder is Shared & Web Shared with EveryOne having Full access to the shared...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.