Discussion:
Send email script
(too old to reply)
vovan
2009-02-24 14:21:24 UTC
Permalink
Sorry if I'm posting in a wrong group.
I have a script:

Dim objMail
Set objMail = CreateObject("CDO.Message")
objMail.From = "***@srs-enterprises.com"
objMail.To = "***@optonline.net"
objMail.Subject = "That's a vbscript mail from
srsnjsrv.srs-enterprises.local"
objMail.Textbody = "Hello World"

objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"srsnjsrv.srs-enterprises.local"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"chapranov"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"developer8686"

objMail.Configuration.Fields.Update
objMail.Send
Set objMail=Nothing

We have 3 servers in the domain. MS Exchange is installed on srsnjsrv
server. I run this script from all servers and everything is fine - mails go
through. For me it looks like one of the machines is a server and 2 others
are clients in this particular situation. I'm trying to run this script from
any workstation in domain and nothing happens. No error messages, but no
emails too. Workstations are clients now.
Outlook installed on all workstations sends emails via Exchange with no
problem.
What is the difference between server machines and workstation machines when
they all are clients for Exchange?
What should be configured (installed, authorized, whatever) on Workstations
in order to make this script work on them as it works on server machines?

Thank you,
vovan
jamestechman
2009-02-24 15:37:32 UTC
Permalink
Are you running any AV\Firewall that may be blocking outbound port 25
on these client machines?


James Chong (MVP)
MCITP | EMA; MCSE | M+, S+,
Security+, Project+, ITIL
msexchangetips.blogspot.com
Post by vovan
Sorry if I'm posting in a wrong group.
Dim objMail
Set objMail = CreateObject("CDO.Message")
objMail.Subject = "That's a vbscript mail from
srsnjsrv.srs-enterprises.local"
objMail.Textbody = "Hello World"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"srsnjsrv.srs-enterprises.local"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"chapranov"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"developer8686"
objMail.Configuration.Fields.Update
objMail.Send
Set objMail=Nothing
We have 3 servers in the domain. MS Exchange is installed on srsnjsrv
server. I run this script from all servers and everything is fine - mails go
through. For me it looks like one of the machines is a server and 2 others
are clients in this particular situation. I'm trying to run this script from
any workstation in domain and nothing happens. No error messages, but no
emails too. Workstations are clients now.
Outlook installed on all workstations sends emails via Exchange with no
problem.
What is the difference between server machines and workstation machines when
they all are clients for Exchange?
What should be configured (installed, authorized, whatever) on Workstations
in order to make this script work on them as it works on server machines?
Thank you,
vovan
vovan
2009-02-24 17:20:47 UTC
Permalink
I did not try on many machines but I turned off AV and Firewall and it still
doesn't work
What else may affect the script behavior?
Thank you

vovan

"jamestechman" <***@gmail.com> wrote in message news:c6a5faea-2cc9-438f-99bc-***@r24g2000vbp.googlegroups.com...
Are you running any AV\Firewall that may be blocking outbound port 25
on these client machines?


James Chong (MVP)
MCITP | EMA; MCSE | M+, S+,
Security+, Project+, ITIL
msexchangetips.blogspot.com
Post by vovan
Sorry if I'm posting in a wrong group.
Dim objMail
Set objMail = CreateObject("CDO.Message")
objMail.Subject = "That's a vbscript mail from
srsnjsrv.srs-enterprises.local"
objMail.Textbody = "Hello World"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"srsnjsrv.srs-enterprises.local"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"chapranov"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"developer8686"
objMail.Configuration.Fields.Update
objMail.Send
Set objMail=Nothing
We have 3 servers in the domain. MS Exchange is installed on srsnjsrv
server. I run this script from all servers and everything is fine - mails go
through. For me it looks like one of the machines is a server and 2 others
are clients in this particular situation. I'm trying to run this script from
any workstation in domain and nothing happens. No error messages, but no
emails too. Workstations are clients now.
Outlook installed on all workstations sends emails via Exchange with no
problem.
What is the difference between server machines and workstation machines when
they all are clients for Exchange?
What should be configured (installed, authorized, whatever) on
Workstations
in order to make this script work on them as it works on server machines?
Thank you,
vovan
Charles
2009-03-02 14:19:01 UTC
Permalink
Hi Vovan:

I'm not sure if this would be the issue but enable smtp on one of your
clients and test. Maybe you have smtp installed on the servers but not on
the clients thus the problem? Also, you may want to use netmon to see if you
can get some errors from tracing activity from that client when you run the
script.

Hope this helps a little.

Chuck
Post by vovan
Sorry if I'm posting in a wrong group.
Dim objMail
Set objMail = CreateObject("CDO.Message")
objMail.Subject = "That's a vbscript mail from
srsnjsrv.srs-enterprises.local"
objMail.Textbody = "Hello World"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"srsnjsrv.srs-enterprises.local"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"chapranov"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"developer8686"
objMail.Configuration.Fields.Update
objMail.Send
Set objMail=Nothing
We have 3 servers in the domain. MS Exchange is installed on srsnjsrv
server. I run this script from all servers and everything is fine - mails go
through. For me it looks like one of the machines is a server and 2 others
are clients in this particular situation. I'm trying to run this script from
any workstation in domain and nothing happens. No error messages, but no
emails too. Workstations are clients now.
Outlook installed on all workstations sends emails via Exchange with no
problem.
What is the difference between server machines and workstation machines when
they all are clients for Exchange?
What should be configured (installed, authorized, whatever) on Workstations
in order to make this script work on them as it works on server machines?
Thank you,
vovan
jford
2009-03-03 13:00:27 UTC
Permalink
Have you checked your anti-virus logs? I know in my environment scripts & exe
that send email have to have a special exception put in place for them to
work.
Post by vovan
Sorry if I'm posting in a wrong group.
Dim objMail
Set objMail = CreateObject("CDO.Message")
objMail.Subject = "That's a vbscript mail from
srsnjsrv.srs-enterprises.local"
objMail.Textbody = "Hello World"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"srsnjsrv.srs-enterprises.local"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusername") =
"chapranov"
objMail.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
"developer8686"
objMail.Configuration.Fields.Update
objMail.Send
Set objMail=Nothing
We have 3 servers in the domain. MS Exchange is installed on srsnjsrv
server. I run this script from all servers and everything is fine - mails go
through. For me it looks like one of the machines is a server and 2 others
are clients in this particular situation. I'm trying to run this script from
any workstation in domain and nothing happens. No error messages, but no
emails too. Workstations are clients now.
Outlook installed on all workstations sends emails via Exchange with no
problem.
What is the difference between server machines and workstation machines when
they all are clients for Exchange?
What should be configured (installed, authorized, whatever) on Workstations
in order to make this script work on them as it works on server machines?
Thank you,
vovan
Loading...