Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 681

The problem with deleting a file from the server after sending SMTP

$
0
0
(Script) Set objEmail = CreateObject("CDO.Message")

with objEmail.Configuration.Fields

.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =""

.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465

.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = ""

.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = ""

.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1

.Update

end with

'potwierdzenie odczytu

objEmail.Fields("urn:schemas:mailheader:disposition-notification-to") = ""

objEmail.fields("urn:schemas:mailheader:return-receipt-to") = ""

objEmail.Fields.Update

'potwierdzenie odczytu koniec

With objEmail

.From = ""

.To = ""

.Subject = ""

.Textbody = txt

' .CreateMHTMLBody "file://C://.htm" 'mail html

.AddAttachment ("\\My_server\sys\.txt")

.Send

end with

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFile = objFSO.GetFile("\\My_server\sys\.txt")

objFSO.DeleteFile("\\My_server\sys\.txt")

wscript.echo ""

wscript.quit(\script)


Annex is taken from the Netware server and the script is executed from a computer with WinXP. Annex add but not delete the file from the server. Of course,

I can simply delete it DEL.

Description of error of VbsEdit :

Code: 800A0035

System: can not find the network path.

Strange because i can delete it from server with DEL. Thx for any advice.

PS. It is my first script so please forgive me for obvious errors.

Viewing all articles
Browse latest Browse all 681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>