Error message vb.script CDO

Hi!

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:
80040220

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: production@edi.volvo.com med attatchment "CSV.XLC"
'
' NB! Outlock MÅ vere installert, for at skriptet skal fungere.
'
     sendemail "test@online.no","R3IN02T120001 40779","tor-er-b@online.no"
 
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"
    objMessage.Send  
End If

Open in new window

LVL 2
team2005Asked:
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.

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

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

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
objMessage.Send



0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

sirbountyCommented:
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 http://www.paulsadowski.com/WSH/cdo.htm for more detail.


Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = "me@my.com"
objMessage.To = "test@paulsadowski.com"
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 _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.myserver.com"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

objMessage.Configuration.Fields.Update

'==End remote SMTP server configuration section==

objMessage.Send
0
team2005Author Commented:
Hi!

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

Thanks for help...

Tor
0
team2005Author Commented:
Hi again!

Have testet your script sirbounty, but still gut problems

Maby some dll-file or somthing is missing ?


0
sirbountyCommented:
What problems/errors do you see?
0
team2005Author Commented:
Hi!

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

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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.