【发布时间】:2014-05-18 02:11:18
【问题描述】:
我正在对一个用经典 asp 编写的网站进行更改。
我的系统是 Windows 7 64 位。
在将网站设置为在 IIS6 上运行的经典 asp 之后,我已经能够运行该网站。
当它尝试执行以下代码时,我收到权限被拒绝错误:
from1 = "Kevin@company.com"
to1 = "staff1@company.com"
to2 = "staff2@company.net"
to3 = "staff3@client.com"
strTo = to1
If Len(strTo) > 0 Then
If Len(to2) > 0 Then
strTo = strTo & ";" & to2
End If
Else
strTo = to2
End If
If Len(strTo) > 0 Then
If Len(to3) > 0 Then
strTo = strTo & ";" & to3
End If
Else
strTo = to3
End If
body = reqApprName & "<br />" & reqApprPhone & "<br />" & reqApprEmail & "<br />Loan Number: "_
& loannum & "<br /><br />Please do not reply back to this email. The Vendor has provided the following "_
& "comment associated with this order.<br /><br />" & reqUndueInfluenceComment
Set ObjMail = CreateObject("CDONTS.Newmail")
ObjMail.From = from1
ObjMail.To = strTo
ObjMail.Subject = "Appraisal Order "&OrderNum&" by Vendor"
ObjMail.BodyFormat = 0
ObjMail.MailFormat = 0
ObjMail.Body = body
ObjMail.Send
Set ObjMail = Nothing
我很困惑,因为我以前从未遇到过 CDONTS 的问题。再说一次,我从未尝试在 Windows 7 64 位机器上使用它,使用 32 位经典 asp。
有人有什么想法吗?
谢谢大家。
PS:我在为 CDONTS.NewMail 创建对象时遇到错误
【问题讨论】:
-
你的机器上真的安装了 cdonts,它很古老吗? cdosys 已成为至少 3 个 IIS 版本的默认组件w3schools.com/asp/asp_send_email.asp
-
我必须安装它。我在发布我的问题之前就这样做了。谢谢。
标签: vbscript asp-classic permission-denied