473,561 Members | 3,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need Help with CDONTS


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 to access the file from the remote location.

<script language="VBScr ipt">

public function testMsg()

Dim objNewMsg' as Message
Dim ObjAttach' as Attachments
Dim objOutbox
Dim sName
Dim sPath

sName = "220010.PDF "
sPath =
"\\NTGDOCPP04\w wwroot\dcv2_rep orts\temp\dmadm in_28-MAR-2007\220010.PDF "

Dim objSession
Set objSession = CreateObject ("CDONTS.Sessio n")
objSession.Logo nSMTP "Lopes,Jame s", "ja***********@ accenture.com"

Set objOutbox = objSession.GetD efaultFolder(2) ' CdoDefaultFolde rOutbox
Set objNewMsg = objOutbox.Messa ges.Add("The Send Message" )
Set ObjAttach = objNewMsg.Attac hments.Add(sNam e, 1, sPath)
'logText_js("Pa ssed testMsg function ")
end function

</script>

Mar 28 '07 #1
2 1838

"jlopes151" <jl*******@disc ussions.microso ft.comwrote in message
news:FD******** *************** ***********@mic rosoft.com...
>
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.
You need to check both the share permissions and the folder/file permissions
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 to access the file from the remote location.

<script language="VBScr ipt">

public function testMsg()

Dim objNewMsg' as Message
Dim ObjAttach' as Attachments
Dim objOutbox
Dim sName
Dim sPath

sName = "220010.PDF "
sPath =
"\\NTGDOCPP04\w wwroot\dcv2_rep orts\temp\dmadm in_28-MAR-2007\220010.PDF "

Dim objSession
Set objSession = CreateObject ("CDONTS.Sessio n")
objSession.Logo nSMTP "Lopes,Jame s", "ja***********@ accenture.com"

Set objOutbox = objSession.GetD efaultFolder(2) ' CdoDefaultFolde rOutbox
Set objNewMsg = objOutbox.Messa ges.Add("The Send Message" )
Set ObjAttach = objNewMsg.Attac hments.Add(sNam e, 1, sPath)
'logText_js("Pa ssed testMsg function ")
end function

</script>
What OS are you on? If Win2000 or Win2003 consider using CDOSYS instead of
CDONTS. CDONTS is deprecated.
Mar 29 '07 #2


"Anthony Jones" wrote:
>
"jlopes151" <jl*******@disc ussions.microso ft.comwrote in message
news:FD******** *************** ***********@mic rosoft.com...

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.

You need to check both the share permissions and the folder/file permissions
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 to access the file from the remote location.

<script language="VBScr ipt">

public function testMsg()

Dim objNewMsg' as Message
Dim ObjAttach' as Attachments
Dim objOutbox
Dim sName
Dim sPath

sName = "220010.PDF "
sPath =
"\\NTGDOCPP04\w wwroot\dcv2_rep orts\temp\dmadm in_28-MAR-2007\220010.PDF "

Dim objSession
Set objSession = CreateObject ("CDONTS.Sessio n")
objSession.Logo nSMTP "Lopes,Jame s", "ja***********@ accenture.com"

Set objOutbox = objSession.GetD efaultFolder(2) ' CdoDefaultFolde rOutbox
Set objNewMsg = objOutbox.Messa ges.Add("The Send Message" )
Set ObjAttach = objNewMsg.Attac hments.Add(sNam e, 1, sPath)
'logText_js("Pa ssed testMsg function ")
end function

</script>

What OS are you on? If Win2000 or Win2003 consider using CDOSYS instead of
CDONTS. CDONTS is deprecated.
The Web user at the Share level has Read acceess, full control at the file
level
Only the parent folder is Shared with the child folders giving full control
at their
levels

Win2000 SP4

Mar 29 '07 #3

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

Similar topics

2
10577
by: Henry | last post by:
Hi, Im trying to send a mail from my webpage using CDONTS but i keep getting the errormessage "Invalid class string" (0x800401F3). I have the SMTP service installed and running on my IIS server on XP. It's when i try to create a NewMail object from the CDONTS library that the problem occurs: set objMail =...
5
8376
by: RIP | last post by:
The time came to upgrade the webserver from 2k server to 2k3 server. In 2k server, the primary web ran flawlessly day after day. I burned the web's files to disk, and put them into the new server, seemed to work til i came to a point where the script needed to mail some people. Script is written in ASP 3.0, and the error is Microsoft...
10
9758
by: Seeker | last post by:
Hi! I have to do some developing and I'm trying to configure my server to mimic the operation of our production server. The issue I'm having is that I'm trying to use CDONTS to send an email under IIS on a Windows 2003 Server. The server does not have the SMTP service running, but I do have a third party SMTP/POP/IMAP server running. I...
8
3941
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
3666
by: Marty | last post by:
ASP.Net, C#, Email message, CDonts not CDO I am writing an ASP.Net application where I cannot use CDO. I must use CDonts. I cannot find an example of this on the Internet. I only see examples on how to do this using CDO. Unfortunately, I don't have that option. I must use C# and CDonts. Do you have any ideas or code? In traditional...
6
4679
by: NetNoise | last post by:
Hi. I'm using CDO SYS to send email messages. I can attach a file just fine. However, I need to attach an HTML page that's generated on the fly by my ASP code. The attachment source code gets assembled into a VB string. How do I attach this? I think there was an easy way in CDONTS but that's no longer an option. Thanks in advance. -Geoff
16
3151
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:
2
9371
by: microsoft.public.dotnet.languages.csharp | last post by:
ASP.Net, C#, Email message, CDonts not CDO I am writing an ASP.Net application where I cannot use CDO. I must use CDonts. I cannot find an example of this on the Internet. I only see examples on how to do this using CDO. Unfortunately, I don't have that option. I must use C# and CDonts. Do you have any ideas or code? In traditional...
8
1670
by: Johnfli | last post by:
Most of my ASP programming experience is on NT4. We recently upgraded (replaced) our NT4 webserver with Win2k3 Web Edition. I am looking for a good book that I can go through that will show me the new and different ways IIS6 does things. I found out that some things still work from my old web site, but they no longer work on the new site....
0
7558
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...
0
7851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8072
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6195
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5462
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...
0
5177
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...
0
3609
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...
0
3591
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1171
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.