J
jlopes151
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="VBScript">
public function testMsg()
Dim objNewMsg' as Message
Dim ObjAttach' as Attachments
Dim objOutbox
Dim sName
Dim sPath
sName = "220010.PDF"
sPath =
"\\NTGDOCPP04\wwwroot\dcv2_reports\temp\dmadmin_28-MAR-2007\220010.PDF"
Dim objSession
Set objSession = CreateObject ("CDONTS.Session")
objSession.LogonSMTP "Lopes,James", "(e-mail address removed)"
Set objOutbox = objSession.GetDefaultFolder(2) ' CdoDefaultFolderOutbox
Set objNewMsg = objOutbox.Messages.Add("The Send Message" )
Set ObjAttach = objNewMsg.Attachments.Add(sName, 1, sPath)
'logText_js("Passed testMsg function ")
end function
</script>
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="VBScript">
public function testMsg()
Dim objNewMsg' as Message
Dim ObjAttach' as Attachments
Dim objOutbox
Dim sName
Dim sPath
sName = "220010.PDF"
sPath =
"\\NTGDOCPP04\wwwroot\dcv2_reports\temp\dmadmin_28-MAR-2007\220010.PDF"
Dim objSession
Set objSession = CreateObject ("CDONTS.Session")
objSession.LogonSMTP "Lopes,James", "(e-mail address removed)"
Set objOutbox = objSession.GetDefaultFolder(2) ' CdoDefaultFolderOutbox
Set objNewMsg = objOutbox.Messages.Add("The Send Message" )
Set ObjAttach = objNewMsg.Attachments.Add(sName, 1, sPath)
'logText_js("Passed testMsg function ")
end function
</script>