473,792 Members | 3,400 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CDONTS - no attachments

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 and it looks
OK...........Ja son
Oct 5 '05 #1
4 1872
1) Show the code
2) where is the attachment stored? On the SERVER right?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Jason Steeves" wrote:
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 and it looks
OK...........Ja son

Oct 5 '05 #2
It gets the attachment from a field, within the web form, that the user can
browse to the required file. I believe the files that the users need to
attach are on their individual computers. If I put
(trim(Request.F orm("attachedfi le"))) inplace for the subject it does return
the valid path to the file along with the file name ie: c:\jason.txt.

Thanks for any help you can provide........ ....Jason

dim MailObj
set MailObj = Server.CreateOb ject("CDONTS.Ne wMail")
MailObj.To = "va***@realemai l.com"
MailObj.From = trim(Request.Fo rm("txtOriginat orMailID"))
MailObj.AttachF ile (trim(Request.F orm("attachedfi le")))
MailObj.Subject = "sending"
MailObj.Body = rstreg
MailObj.BodyFor mat = 0
MailObj.MailFor mat = 0
MailObj.Send
set MailObj = nothing

"Curt_C [MVP]" wrote:
1) Show the code
2) where is the attachment stored? On the SERVER right?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Jason Steeves" wrote:
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 and it looks
OK...........Ja son

Oct 5 '05 #3
first off, the files for attachment have to be on the server, the cdonts (you
really should use CDO and not CDONTS also) is on the server, and it doesnt
have access to files on the client.

Secondly, try hardcoding one of the server files as the attachment file and
test.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Jason Steeves" wrote:
It gets the attachment from a field, within the web form, that the user can
browse to the required file. I believe the files that the users need to
attach are on their individual computers. If I put
(trim(Request.F orm("attachedfi le"))) inplace for the subject it does return
the valid path to the file along with the file name ie: c:\jason.txt.

Thanks for any help you can provide........ ....Jason

dim MailObj
set MailObj = Server.CreateOb ject("CDONTS.Ne wMail")
MailObj.To = "va***@realemai l.com"
MailObj.From = trim(Request.Fo rm("txtOriginat orMailID"))
MailObj.AttachF ile (trim(Request.F orm("attachedfi le")))
MailObj.Subject = "sending"
MailObj.Body = rstreg
MailObj.BodyFor mat = 0
MailObj.MailFor mat = 0
MailObj.Send
set MailObj = nothing

"Curt_C [MVP]" wrote:
1) Show the code
2) where is the attachment stored? On the SERVER right?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Jason Steeves" wrote:
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 and it looks
OK...........Ja son

Oct 5 '05 #4
And here is a pure ASP (i.e. no components) resource for letting the
user upload a file which is something that was unfortunately not built
into ASP:

ASP File Upload Using VBScript by John R. Lewis - 7/10/2000
http://aspzone.com/articles/160.aspx

The above free code has worked well for me and you can copy and paste
the code sample which is white on gray (what were they thinking?) or
just highlight it and it becomes black on white.

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips

*** Sent via Developersdex http://www.developersdex.com ***
Oct 5 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1271
by: Chris Kennedy | last post by:
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.
2
1763
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 0 bytes when I try to save to disk from Outlook. I'm sure that files to be attached are accesible, because security is set to allow for Everyone. I suspect something with SMTP config, but what? Because I couldn't find what's wrong I moved to...
8
3952
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 and if so, how can I send emails from ASP page... Many thanks in advance
2
1888
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; http://msdn.microsoft.com/library/en-us/cdo/html/_denali_newmail_object_cdonts_library_.asp?frame=true But, I'm having trouble GETTING the relevant field from my HTML form! I can't seem to be able to get the field property. :( It just comes up as a blank.
16
3175
by: tshad | last post by:
I have both cdosys.dll and cdonts.dll on my W2K3 server. We have been told by our web authors that their asp code won't work on our machine and that we don't have CDONTS installed on our machine. They're getting an error from: Set objCDOMail = Server.CreateObject("CDONTS.NewMail") I know that the new format is:
7
2037
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 an "unknown exception" error. However, I know that it's because there's now too much data (If I remove some of the text it goes fine). I've "compacted" the message as much as I can, but I've got up to the limit now of how much I can compact...
2
3310
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 all the time and i do not understand why is happening at all.
2
1858
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 folder. I can pull the file from other ways, dropping the full path in the Run of Windows, Using Outlook to send an e-mail with the file attached I get one of those Unspecified error messages. By the way this code works if the file is local. I need...
7
2890
by: Paul | last post by:
I have just started work on a system using CDONTS to mail out. Whilst this is fine on the server, my local development machine is using XP Pro with IIS5.1 installed. Is there a way I can get the functionality of cdonts so that I can test/develop on my local machine, preferably without actually sending any mail to the persons involved.
0
9517
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9997
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5435
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.