A
alex
Hi,
Does anybody have an idea why is this happening. The following code works
great on my development machine (windows 2000 pro), but on the test server
(Windows 2000 Server) it can only send emails to addresses on our domain. If
I specify other address I just get a 8004020f error message. The smtp server
I'm trying to send is on a separate machine (Windows NT Server).
I think it has something to do with web server configuration, or even maybe
smtp server? But the fact that I can send it from my machine throws me
off... I also tried a Perl script to send email using the same smtp server
and I have the same problem, works from my machine, fails on test server.
Anyone came across something like that?
Thanks,
Alex
Code follows:
Set msg = Server.CreateObject("CDO.Message")
Dim iConf
Set iConf = CreateObject("CDO.Configuration")
Dim Flds
Set Flds = iConf.Fields
Flds("http://schemas.microsoft.com/cdo/configuration/Sendusing") = 2
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"11.11.111.11" 'real IP actually used
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Flds.Update
Set msg.Configuration = iConf
'Works on my machine, but fails on the server.
msg.To = "(e-mail address removed)"
msg.From = "(e-mail address removed)"
msg.Subject = "Test - " & now()
msg.TextBody = "Test message - " & now()
msg.Send
set msg = nothing
Does anybody have an idea why is this happening. The following code works
great on my development machine (windows 2000 pro), but on the test server
(Windows 2000 Server) it can only send emails to addresses on our domain. If
I specify other address I just get a 8004020f error message. The smtp server
I'm trying to send is on a separate machine (Windows NT Server).
I think it has something to do with web server configuration, or even maybe
smtp server? But the fact that I can send it from my machine throws me
off... I also tried a Perl script to send email using the same smtp server
and I have the same problem, works from my machine, fails on test server.
Anyone came across something like that?
Thanks,
Alex
Code follows:
Set msg = Server.CreateObject("CDO.Message")
Dim iConf
Set iConf = CreateObject("CDO.Configuration")
Dim Flds
Set Flds = iConf.Fields
Flds("http://schemas.microsoft.com/cdo/configuration/Sendusing") = 2
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"11.11.111.11" 'real IP actually used
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Flds.Update
Set msg.Configuration = iConf
'Works on my machine, but fails on the server.
msg.To = "(e-mail address removed)"
msg.From = "(e-mail address removed)"
msg.Subject = "Test - " & now()
msg.TextBody = "Test message - " & now()
msg.Send
set msg = nothing