Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - CDO Problem

Reply
 
Old 05-21-2009   #1 (permalink)
Pegasus [MVP]


 
 

CDO Problem

I'm trying to configure a script for a client so that he can send messages
while away from the office. The following batch file works nicely,
regardless of his location:
@echo off
set Sender=me@xxxxxx_isp.com
set Host=mail.office_isp.com
set User=me@xxxxxx_isp.com
set Password=MyPassword
set To=me@xxxxxx_isp.com
blat.exe test.txt -server %Host% -subject Test -f %Sender% -to %To% -U
%User% -PW %password%

The following script file works while he is in the office but fails when he
is on site:

schema = "http://schemas.microsoft.com/cdo/configuration/"
Set objEmail = CreateObject("CDO.Message")
With objEmail
.From = "me@xxxxxx_isp.com"
.To = "me@xxxxxx_isp.com"
.Subject = "Test Mail"
.Textbody = "The quick brown fox"
With .Configuration.Fields
.Item (schema & "sendusing") = 2
.Item (schema & "smtpserver") = "mail.office_isp.com"
.Item (schema & "smtpserverport") = 25
.Item (schema & "smtpauthenticate") = cdoBasic
.Item (schema & "sendusername") = "me@xxxxxx_isp.com"
.Item (schema & "smtpaccountname") = "me@xxxxxx_isp.com"
.Item (schema & "sendpassword") = "MyPassword"
End With
.Configuration.Fields.Update
.Send
End With

The error message is:
The server rejected one or more recipient addresses. The server response
was: 554 5.7.1 <82-220-76-236.client_isp.com[82.220.76.236]>: Client host
rejected: Access denied

Any thoughts as to why the batch file works and the script fails, even
though it uses exactly the same parameters?



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
the problem with ndis.sys Blue Screen of Death problem solved? Vista General
Re: Windows Mail Attachement Problem and Adobe Player Problem with IE8 Vista mail
Multi-select problem in Windows Explorer BIG PROBLEM!!!!!! Vista General
Generic McAfee Problem Message in Vista Problem Reports Vista performance & maintenance
Vista Upgrade Problem - Windows Explorer Loop problem Vista installation & setup


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46