For Programmers: Free Programming Magazines  


Home > Archive > ASP > September 2004 > Sending email problem with Windows 2000 professional









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sending email problem with Windows 2000 professional
Alex

2004-09-24, 3:55 pm

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 = "wz9919@hotmail.com"
.CC = "wz9919@yahoo.com"
.From = "wz9919@sympatico.ca"
.Subject = "Testing"
.TextBody = "Testing"
.Send
End With
Set iMsg=Nothing
Set iConf=Nothing
Set Flds=Nothing

Ray Costanzo [MVP]

2004-09-24, 3:55 pm

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" <Alex@discussions.microsoft.com> wrote in message
news:0CB00A4E-E74F-4055-BF43-A9BCD67F20BB@microsoft.com...
>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 = "wz9919@hotmail.com"
> .CC = "wz9919@yahoo.com"
> .From = "wz9919@sympatico.ca"
> .Subject = "Testing"
> .TextBody = "Testing"
> .Send
> End With
> Set iMsg=Nothing
> Set iConf=Nothing
> Set Flds=Nothing
>



Alex

2004-09-24, 3:55 pm

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 [MVP]" wrote:

> 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" <Alex@discussions.microsoft.com> wrote in message
> news:0CB00A4E-E74F-4055-BF43-A9BCD67F20BB@microsoft.com...
>
>
>

Ray Costanzo [MVP]

2004-09-24, 3:55 pm

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" <Alex@discussions.microsoft.com> wrote in message
news:C7233013-02CD-44CA-9E1D-144480AD9D5A@microsoft.com...[color=darkred]
>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 [MVP]" wrote:
>


Alex

2004-09-24, 8:55 pm

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 [MVP]" wrote:

> 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" <Alex@discussions.microsoft.com> wrote in message
> news:C7233013-02CD-44CA-9E1D-144480AD9D5A@microsoft.com...
>
>
>

Ray Costanzo [MVP]

2004-09-25, 3:58 am

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" <Alex@discussions.microsoft.com> wrote in message
news:6DBDEC40-7B9D-4408-8E0A-D0E975B9185D@microsoft.com...[color=darkred]
>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 [MVP]" wrote:
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com