Hi,
I am trying to send mail thru the ASP code with VBscript on IIS web server from my web page. but I am getting Error:Access is Denied.
Can someone tell me what could be the problem.
Thanks
I am trying to run the following ASP code which is called from another html page:
<%@ Language=VBScript %>
<%
'Send using the Pickup directory on the IIS server
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Const cdoSendUsingPickup = 1
set iMsg = CreateObject("CDO.Message"
set iConf = CreateObject("CDO.Configuration"
' set the CDOSYS configuration fields to use the SMTP service pickup directory
Set Flds = iConf.Fields
With Flds
.Item(" = cdoSendUsingPickup
.Item(" = "c:\inetpub\mailroot\pickup"
.Update
End With
' build HTML for message body
strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"
' apply settings to the message
With iMsg
Set .Configuration = iConf
.To = "user@mydomain.com"
.From = "admin@mydomain.com"
.Subject = "This is a test CDOSYS message (Pickup directory)"
.HTMLBody = strHTML
.Send
End With
' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>
I am trying to send mail thru the ASP code with VBscript on IIS web server from my web page. but I am getting Error:Access is Denied.
Can someone tell me what could be the problem.
Thanks
I am trying to run the following ASP code which is called from another html page:
<%@ Language=VBScript %>
<%
'Send using the Pickup directory on the IIS server
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Const cdoSendUsingPickup = 1
set iMsg = CreateObject("CDO.Message"
set iConf = CreateObject("CDO.Configuration"
' set the CDOSYS configuration fields to use the SMTP service pickup directory
Set Flds = iConf.Fields
With Flds
.Item(" = cdoSendUsingPickup
.Item(" = "c:\inetpub\mailroot\pickup"
.Update
End With
' build HTML for message body
strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"
' apply settings to the message
With iMsg
Set .Configuration = iConf
.To = "user@mydomain.com"
.From = "admin@mydomain.com"
.Subject = "This is a test CDOSYS message (Pickup directory)"
.HTMLBody = strHTML
.Send
End With
' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>