Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this message127.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
>
Post Follow-up to this messageI 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 sor
t?
> 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...
>
>
>
Post Follow-up to this messageIs 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... >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: >
Post Follow-up to this messageI 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 th e > 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... > > >
Post Follow-up to this messageWell, 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... >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: >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.