Sending email problem with Windows 2000 professional

Discussion in 'ASP General' started by Alex, Sep 24, 2004.

  1. Alex

    Alex Guest

    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 = ""
    .CC = ""
    .From = ""
    .Subject = "Testing"
    .TextBody = "Testing"
    .Send
    End With
    Set iMsg=Nothing
    Set iConf=Nothing
    Set Flds=Nothing
     
    Alex, Sep 24, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    >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 = ""
    > .CC = ""
    > .From = ""
    > .Subject = "Testing"
    > .TextBody = "Testing"
    > .Send
    > End With
    > Set iMsg=Nothing
    > Set iConf=Nothing
    > Set Flds=Nothing
    >
     
    Ray Costanzo [MVP], Sep 24, 2004
    #2
    1. Advertising

  3. Alex

    Alex Guest

    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" <> wrote in message
    > news:...
    > >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 = ""
    > > .CC = ""
    > > .From = ""
    > > .Subject = "Testing"
    > > .TextBody = "Testing"
    > > .Send
    > > End With
    > > Set iMsg=Nothing
    > > Set iConf=Nothing
    > > Set Flds=Nothing
    > >

    >
    >
    >
     
    Alex, Sep 24, 2004
    #3
  4. 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" <> wrote in message
    news:...
    >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" <> wrote in message
    >> news:...
    >> >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 = ""
    >> > .CC = ""
    >> > .From = ""
    >> > .Subject = "Testing"
    >> > .TextBody = "Testing"
    >> > .Send
    >> > End With
    >> > Set iMsg=Nothing
    >> > Set iConf=Nothing
    >> > Set Flds=Nothing
    >> >

    >>
    >>
    >>
     
    Ray Costanzo [MVP], Sep 24, 2004
    #4
  5. Alex

    Alex Guest

    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" <> wrote in message
    > news:...
    > >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" <> wrote in message
    > >> news:...
    > >> >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 = ""
    > >> > .CC = ""
    > >> > .From = ""
    > >> > .Subject = "Testing"
    > >> > .TextBody = "Testing"
    > >> > .Send
    > >> > End With
    > >> > Set iMsg=Nothing
    > >> > Set iConf=Nothing
    > >> > Set Flds=Nothing
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >
     
    Alex, Sep 24, 2004
    #5
  6. 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" <> wrote in message
    news:...
    >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" <> wrote in message
    >> news:...
    >> >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" <> wrote in message
    >> >> news:...
    >> >> >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 = ""
    >> >> > .CC = ""
    >> >> > .From = ""
    >> >> > .Subject = "Testing"
    >> >> > .TextBody = "Testing"
    >> >> > .Send
    >> >> > End With
    >> >> > Set iMsg=Nothing
    >> >> > Set iConf=Nothing
    >> >> > Set Flds=Nothing
    >> >> >
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>
     
    Ray Costanzo [MVP], Sep 25, 2004
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dragomir

    ASP .NET on Windows 2000 Professional

    Dragomir, Jul 25, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    457
    Dragomir
    Jul 25, 2003
  2. =?Utf-8?B?YW9y?=
    Replies:
    0
    Views:
    335
    =?Utf-8?B?YW9y?=
    Oct 19, 2004
  3. =?Utf-8?B?YW9y?=
    Replies:
    2
    Views:
    356
    alan.washington
    Oct 19, 2004
  4. bienwell
    Replies:
    3
    Views:
    376
    bienwell
    Oct 18, 2006
  5. Dan
    Replies:
    2
    Views:
    118
Loading...

Share This Page