Error message vb.script CDO


Include the source for sending a email with attachment...
Working just fine on my computer.
I am using windows XP Pro.

Tryed the same code on my client PC.
And they are using Windows XP Pro olso...

But gat this error number:

Is there somthing missing in the source ?

' VB SCRIPT - AutosaveAndSend.vbs
' Lagrer vedlegg fra email til mappe VPIM (Navn lagret fil = N.txt
' Sender email til: med attatchment "CSV.XLC"
' NB! Outlock MÅ vere installert, for at skriptet skal fungere.
     sendemail "","R3IN02T120001 40779",""
Sub sendemail(fraemail,subjekt,emailtil)
Dim objMessage
Set oFSO = CreateObject("Scripting.FileSystemObject")  ' Opretter filobjektet
Set objMessage = CreateObject("CDO.Message")
If oFSO.FileExists("C:\VPIM\F.txt") Then
'Sender email hvis CSV-filen er laget
    objMessage.Subject = subjekt
    objMessage.From = fraemail
    objMessage.To = emailtil
    objMessage.AddAttachment "c:\VPIM\N.txt"
End If

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Is the client behind another domain/isp?
You may have to add cdo configuration to setup the smtp address...
David LeeCommented:
Hi, team2005.

What's the text of the error message?
team2005Author Commented:

Okey, how to setup config file ?

Can't give you the text.... Dident write it down.
But i know that the error was coming from

Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Well, it would depend on the environment - did you send it successfully from your provider and it failed from another?
Could be a lot of reasons...since I still don't know, here's an example of a cdo message with configuration fields added/updated:
See for more detail.

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = ""
objMessage.To = ""
objMessage.TextBody = "This is some sample message text."

'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("") = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("") = ""

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("") = 25


'==End remote SMTP server configuration section==

team2005Author Commented:

Okey, i wil try this source on my client PC.
And come back to you, how it went...

Thanks for help...

team2005Author Commented:
Hi again!

Have testet your script sirbounty, but still gut problems

Maby some dll-file or somthing is missing ?

What problems/errors do you see?
team2005Author Commented:

Found out of this myself..
The problem was that IIS, wasent installed..

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.