EMail script fails from Server 2008 only

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi there,
I've been struggling with this problem for 2 months, the Microsoft Partner
group pointed me here. It feels like a simple problem, but clearly not.

Basically I have a script that sends emails after backup jobs complete. On
any server 2003 machine the script works fine.

If I run it from a server 2008 machine I get a logon box which comes from
our Exchange 2007 server at the office. If I leave this blank and hit
'cancel', then the email works so it obviously picks up the authentication
information from my script.

If I hit "OK" at the popup box then the script fails. I believe that this is
because the blank values in the authentication box overwrite the
authentication values in the script.

Here is my pretty basic script

================================

Const cdoSendUsingPickup = 1 'Send message using the local SMTP service
pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over
the network).

Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Email script"
objMessage.From = "backupreport@xxxxxxxxxxxxxxxx"
objMessage.To = "me@xxxxxxxxxxxxxx"
objMessage.TextBody = "Test Email"

'==This section provides the configuration information for the remote SMTP
server.

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";) =
"mail.domainname.co.uk"

'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate";) = cdoNTLM

'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername";) =
"backupreport"

'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword";) = "password"

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

'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl";) = False

'Connection Timeout in seconds (the maximum time CDO will try to establish a
connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout";) = 60

objMessage.Configuration.Fields.Update

'==End remote SMTP server configuration section==

objMessage.Send

==========================================

Can anyone please help with this?

.



Relevant Pages

  • RE: Loopholes in a proxy and smtp server
    ... but I don't know what the implications of doing that would be on your proxy. ... Loopholes in a proxy and smtp server ... The script is actually running client side on your proxy server. ...
    (Security-Basics)
  • Re: Mail::SendEasy defaulting to localhost?
    ... Trying to put together a simple script that sends out email via my SMTP ... You do have a SMTP server running locally by default. ... which logs into your ISP's Mailserver with authentication. ...
    (comp.lang.perl.misc)
  • Re: [SLE] SMTP authentication was re:[SLE] mail sending and Postfix was OT: Posting from another un
    ... Would its request be answered by the second SMTP server or would SMTP-3 try and contact the original dialup server which may not be currently connected? ... Authentication, when it is required, will alway happen between the server that currently has the mail and the server that is contacted to receive the mail. ... gmail account through gmail smtp server (bypassing your ISP smtp server), this will also request some ID. ...
    (SuSE)
  • newbee question about sending parameters
    ... The script works like this, but I would like to modify the script so that I ... 'Sending a text email using authentication against a remote SMTP server ... Const cdoSendUsingPickup = 1 ... ' This section provides the configuration information for the SMTP server. ...
    (microsoft.public.scripting.vbscript)
  • Re: [SLE] SMTP authentication
    ... Would its request be answered by the second SMTP server or would SMTP-3 try and contact the original dialup server which may not be currently connected? ... Authentication, when it is required, will alway happen between the server that currently has the mail and the server that is contacted to receive the mail. ... Now the company mailserver does not have the right to send the mail directly to the internet. ...
    (SuSE)