I need to be able to send emails from my webserver using ASP and I am using CDOSYS to do this. I have set up my Global.asa file as follows:
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Type Library" -->
<SCRIPT RUNAT=Server LANGUAGE=VBScript>
' When the session start set the mail configuration options
Sub Session_OnStart()
' Declare required variables
Dim iConf, Flds
' Set the Configuration and Field objects
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' Set the configuration parameters
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mailserver"
.Update
End With
' Store the configuration as a Session variable
Set Session("Config") = iConf
End Sub
</SCRIPT>
The problem is that it will send internal emails but will not send external mails. Can anyone tell me how to fix this problem???
Mighty
<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Type Library" -->
<SCRIPT RUNAT=Server LANGUAGE=VBScript>
' When the session start set the mail configuration options
Sub Session_OnStart()
' Declare required variables
Dim iConf, Flds
' Set the Configuration and Field objects
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' Set the configuration parameters
With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mailserver"
.Update
End With
' Store the configuration as a Session variable
Set Session("Config") = iConf
End Sub
</SCRIPT>
The problem is that it will send internal emails but will not send external mails. Can anyone tell me how to fix this problem???
Mighty