Sending email problem with Windows 2000 professional

A

Alex

I wrote an asp program to send email. I set SMTP as 127.0.0.1 and it worked
well in Windows 2000 server but not in Windows 2000 Professional. What is
different between server and professional. My code is below:

Set iMsg = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds("cdoSendUsingMethod") = cdoSendUsingPort
Flds("cdoSMTPServer") = "127.0.0.1"
Flds("cdoSMTPServerPort") = 25
Flds("cdoSMTPAuthenticate") = cdoAnonymous ' 0
Flds.Update
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = "(e-mail address removed)"
.From = "(e-mail address removed)"
.Subject = "Testing"
.TextBody = "Testing"
.Send
End With
Set iMsg=Nothing
Set iConf=Nothing
Set Flds=Nothing
 
R

Ray Costanzo [MVP]

127.0.0.1 is the loopback address of the local machine, meaning you're
saying Flds("cdoSMTPServer") = [This computer that is running this script.]

Do you have SMTP installed on this machine?
In what way does this "not work" for you? Do you get an error of some sort?
Is this machine authorized to relay mail in your network?

Ray at work
 
A

Alex

I installed IIS 5.0 and SMTP service. I could get the email when I ran this
asp in server and but I couldn't get it when I ran it in professional.
Actually I didn't get any errors and I don't know if it is authorized to
relay emails. But I could get emails if I ran asp.net program to send email
out.

Alex


Ray Costanzo said:
127.0.0.1 is the loopback address of the local machine, meaning you're
saying Flds("cdoSMTPServer") = [This computer that is running this script.]

Do you have SMTP installed on this machine?
In what way does this "not work" for you? Do you get an error of some sort?
Is this machine authorized to relay mail in your network?

Ray at work

Alex said:
I wrote an asp program to send email. I set SMTP as 127.0.0.1 and it worked
well in Windows 2000 server but not in Windows 2000 Professional. What is
different between server and professional. My code is below:

Set iMsg = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds("cdoSendUsingMethod") = cdoSendUsingPort
Flds("cdoSMTPServer") = "127.0.0.1"
Flds("cdoSMTPServerPort") = 25
Flds("cdoSMTPAuthenticate") = cdoAnonymous ' 0
Flds.Update
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = "(e-mail address removed)"
.From = "(e-mail address removed)"
.Subject = "Testing"
.TextBody = "Testing"
.Send
End With
Set iMsg=Nothing
Set iConf=Nothing
Set Flds=Nothing
 
R

Ray Costanzo [MVP]

Is the e-mail still sitting in \inetpub\mailroot\queue? Take a look in the
application event log to see if relaying was denied. Did you setup a
smarthost or anything in your SMTP settings? If so, make sure the target
server allows relaying from your machine's IP.

Ray at work

Alex said:
I installed IIS 5.0 and SMTP service. I could get the email when I ran
this
asp in server and but I couldn't get it when I ran it in professional.
Actually I didn't get any errors and I don't know if it is authorized to
relay emails. But I could get emails if I ran asp.net program to send
email
out.

Alex


Ray Costanzo said:
127.0.0.1 is the loopback address of the local machine, meaning you're
saying Flds("cdoSMTPServer") = [This computer that is running this
script.]

Do you have SMTP installed on this machine?
In what way does this "not work" for you? Do you get an error of some
sort?
Is this machine authorized to relay mail in your network?

Ray at work

Alex said:
I wrote an asp program to send email. I set SMTP as 127.0.0.1 and it
worked
well in Windows 2000 server but not in Windows 2000 Professional. What
is
different between server and professional. My code is below:

Set iMsg = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds("cdoSendUsingMethod") = cdoSendUsingPort
Flds("cdoSMTPServer") = "127.0.0.1"
Flds("cdoSMTPServerPort") = 25
Flds("cdoSMTPAuthenticate") = cdoAnonymous ' 0
Flds.Update
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = "(e-mail address removed)"
.From = "(e-mail address removed)"
.Subject = "Testing"
.TextBody = "Testing"
.Send
End With
Set iMsg=Nothing
Set iConf=Nothing
Set Flds=Nothing
 
A

Alex

I didn't see any deny message in the appliaction log and i didn't setup
smarhost or other in my SMTP. I don't know why the target email server
disallow relaying from my computer. But it is different that my windows 2000
server has public IP but professional doesnt have.

Alex

Ray Costanzo said:
Is the e-mail still sitting in \inetpub\mailroot\queue? Take a look in the
application event log to see if relaying was denied. Did you setup a
smarthost or anything in your SMTP settings? If so, make sure the target
server allows relaying from your machine's IP.

Ray at work

Alex said:
I installed IIS 5.0 and SMTP service. I could get the email when I ran
this
asp in server and but I couldn't get it when I ran it in professional.
Actually I didn't get any errors and I don't know if it is authorized to
relay emails. But I could get emails if I ran asp.net program to send
email
out.

Alex


Ray Costanzo said:
127.0.0.1 is the loopback address of the local machine, meaning you're
saying Flds("cdoSMTPServer") = [This computer that is running this
script.]

Do you have SMTP installed on this machine?
In what way does this "not work" for you? Do you get an error of some
sort?
Is this machine authorized to relay mail in your network?

Ray at work

I wrote an asp program to send email. I set SMTP as 127.0.0.1 and it
worked
well in Windows 2000 server but not in Windows 2000 Professional. What
is
different between server and professional. My code is below:

Set iMsg = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds("cdoSendUsingMethod") = cdoSendUsingPort
Flds("cdoSMTPServer") = "127.0.0.1"
Flds("cdoSMTPServerPort") = 25
Flds("cdoSMTPAuthenticate") = cdoAnonymous ' 0
Flds.Update
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = "(e-mail address removed)"
.From = "(e-mail address removed)"
.Subject = "Testing"
.TextBody = "Testing"
.Send
End With
Set iMsg=Nothing
Set iConf=Nothing
Set Flds=Nothing
 
R

Ray Costanzo [MVP]

Well, when you an admin who is at least not totally incompetent, he will not
allow relaying from any IP but those he explicitly specifies. So, chances
are the e-mail is being denied by your Internet-outbound SMTP server. Ask
your admin if SMTP relaying is permitted by your inhouse SMTP server -
perhaps your Exchange server.

Ray at home

Alex said:
I didn't see any deny message in the appliaction log and i didn't setup
smarhost or other in my SMTP. I don't know why the target email server
disallow relaying from my computer. But it is different that my windows
2000
server has public IP but professional doesnt have.

Alex

Ray Costanzo said:
Is the e-mail still sitting in \inetpub\mailroot\queue? Take a look in
the
application event log to see if relaying was denied. Did you setup a
smarthost or anything in your SMTP settings? If so, make sure the target
server allows relaying from your machine's IP.

Ray at work

Alex said:
I installed IIS 5.0 and SMTP service. I could get the email when I ran
this
asp in server and but I couldn't get it when I ran it in professional.
Actually I didn't get any errors and I don't know if it is authorized
to
relay emails. But I could get emails if I ran asp.net program to send
email
out.

Alex


:

127.0.0.1 is the loopback address of the local machine, meaning you're
saying Flds("cdoSMTPServer") = [This computer that is running this
script.]

Do you have SMTP installed on this machine?
In what way does this "not work" for you? Do you get an error of some
sort?
Is this machine authorized to relay mail in your network?

Ray at work

I wrote an asp program to send email. I set SMTP as 127.0.0.1 and it
worked
well in Windows 2000 server but not in Windows 2000 Professional.
What
is
different between server and professional. My code is below:

Set iMsg = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds("cdoSendUsingMethod") = cdoSendUsingPort
Flds("cdoSMTPServer") = "127.0.0.1"
Flds("cdoSMTPServerPort") = 25
Flds("cdoSMTPAuthenticate") = cdoAnonymous ' 0
Flds.Update
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = "(e-mail address removed)"
.From = "(e-mail address removed)"
.Subject = "Testing"
.TextBody = "Testing"
.Send
End With
Set iMsg=Nothing
Set iConf=Nothing
Set Flds=Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,045
Messages
2,570,389
Members
47,052
Latest member
ketan

Latest Threads

Top