CDO.Message.1 错误 '80070005'访问被拒绝。
当我尝试通过本地服务器发送时,我收到此错误
CDO.Message.1 error '80070005'
Access is denied.
/mail.asp, line xxx
这是我正在使用的代码
MailBodyText = "TEST"
Set objNewMail = CreateObject("CDO.Message")
objNewMail.To = sSendTo
objNewMail.From = "[email protected]"
objNewMail.Cc = "[email protected]"
objNewMail.Subject = "Information Request & Feedback"
objNewMail.HTMLBody = "The following information was sent from " & sEmail & ":" & "<br>" & CHR(13) & MailBodyText & "<br>copies of this mail we sent to :"& sSendTo
objNewMail.Send
Set objNewMail = Nothing
看起来这是 ISSUR 的权限错误,没有写入 mailroot/pickup 文件夹的写入权限。
但我们已经检查过,该网站使用的服务帐户似乎拥有该权限。
问题是这个错误总是文件权限错误吗?
问题如何知道/设置 CDO 正在使用的位置?这样我们就可以确认权限
还应该考虑什么来解决这个问题?
I am getting this error when I try to send via the local server
CDO.Message.1 error '80070005'
Access is denied.
/mail.asp, line xxx
Here is the code I am using
MailBodyText = "TEST"
Set objNewMail = CreateObject("CDO.Message")
objNewMail.To = sSendTo
objNewMail.From = "[email protected]"
objNewMail.Cc = "[email protected]"
objNewMail.Subject = "Information Request & Feedback"
objNewMail.HTMLBody = "The following information was sent from " & sEmail & ":" & "<br>" & CHR(13) & MailBodyText & "<br>copies of this mail we sent to :"& sSendTo
objNewMail.Send
Set objNewMail = Nothing
It looks like it is a permission error at the ISSUR doesn't have write permission to write to the mailroot/pickup folder.
But we have checked that and the services account that this site is using seems to have the rights.
Question is this error always a file permission error?
Question how to know / set the location that CDO is using? So we can confirm the permissions
What else should look at to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用允许身份验证和其他微调的
.configuration
属性。示例位于:http://www.paulsadowski.com/wsh/cdo.htm
update
.configuration
属性允许设置取货目录(根据您的要求)Use the
.configuration
property which allows for authentication and other fine tuning..examples at : http://www.paulsadowski.com/wsh/cdo.htm
update
The
.configuration
property allows to set the pickup directory (as you request)如果您不想更改代码
授予 IIS_IUSRS 组对 c:\inetpub\mailroot\Pickup 文件夹或您的任何文件夹的写入权限拾取目录
它必须是IIS_IUSRS Group,而不是IUSR User(您可能拼写错误)。
在执行 blog.msdn.com
我不必更改 ASP代码。你的代码在我的服务器上运行良好。
IF YOU DON'T WANT TO CHANGE YOUR CODE
Grant IIS_IUSRS group write access to c:\inetpub\mailroot\Pickup folder or whatever is your pickup dir.
It must be IIS_IUSRS Group, not the IUSR User (you got it mispelled probably).
I was getting this error after performing steps specified in option 3 at blog.msdn.com
I didn't have to change the ASP code. Your code works fine on my server.
我正在将一些旧的经典 asp 站点迁移到新的(windows 2008R2)服务器,并且我遇到了“完全相同”的问题(至少是相同的错误和基本相同的代码)。 Gaby提出的解决方案:
对我来说不起作用,我仍然有同样的错误。
经过一番搜索后,我发现了这个建议:(
不要设置 smtpserverpickupdirectory)
现在它工作正常。
顺便说一句,如果您需要在 Windows 2008 服务器(IIS7)上设置必要的 SMTP 服务,我发现 此博客非常有帮助。
更新:
根据 microsoft sendusing = 1 使用 SMTP 服务器,sendusing 2 使用 Outlook Express,我查看了服务器,似乎没有安装 Outlookexpress 或 Windows Mail,但此设置仍然对我有用。如果有人能解释一下,我很想知道。
I am migrating some old classic asp sites to a new (windows 2008R2) server and I had "exactly" the same problem (well at least the same error and basically the same code). The solution presented by Gaby:
did not work for me, i still had the same error.
After some searching i found this suggestion:
(do NOT set the smtpserverpickupdirectory)
Now it works fine.
By the way if you need to set up the necessary SMTP service on Windows 2008 server (IIS7), I found this blog extremely helpfull.
UPDATE:
According to microsoft sendusing = 1 uses the SMTP server and sendusing 2 uses Outlook Express, I've looked on the server, and there doesn't seem to be outlookexpress or windows mail installed, still this setting workes for me. If anyone could explain that I'm curious to know.