dennisdominic
asked on
ASP CDO Error with ObjSendMail.CreateMHTMLBody CDO.Message.1 error '80070005'
I am sending an email using CDO via my ASP page. I get this error:
CDO.Message.1 error '80070005'
Access is denied.
/eureka/mailinfo.asp, line 52
Line 52 relates to the ObjSendMail.CreateMHTMLBod y line of the code.
- ObjSendMail.CreateMHTMLBod y "http://www.xxx.com/eureka/info.asp?id=123"
I have navigated seperately to the page and it works fine.
If I replace Line 52 with
- ObjSendMail.CreateMHTMLBod y "http://www.google.com"
OR
- ObjSendMail.CreateMHTMLBod y "http://www.xxx.com/eureka/anotherDocument.asp?key=234"
Both works fine.
So there must be an issue with info.asp?id=123... but what causes the system to have problem? JavaScripts? anyone?
CDO.Message.1 error '80070005'
Access is denied.
/eureka/mailinfo.asp, line 52
Line 52 relates to the ObjSendMail.CreateMHTMLBod
- ObjSendMail.CreateMHTMLBod
I have navigated seperately to the page and it works fine.
If I replace Line 52 with
- ObjSendMail.CreateMHTMLBod
OR
- ObjSendMail.CreateMHTMLBod
Both works fine.
So there must be an issue with info.asp?id=123... but what causes the system to have problem? JavaScripts? anyone?
ASKER
I found out why. The directory of
http://www.xxx.com/eureka/
is protected and not accessible. The solution was to move the file info.asp to another directory that is not protected.
I made a mistake in the question.
ObjSendMail.CreateMHTMLBod
Should Not work as well, as it is also in the same directory.
I will award the points later if there's no alternative solution that keeps the file in the same directory as well as allowing permission securely. Can I give permission for just a single file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You said, if you replace with those two lines, it works fine. But my guess would be try doing this...
Set objConfig = Server.CreateObject("CDO.C
Set Confi = objConfig.Fields
Confi("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Confi("http://schemas.microsoft.com/cdo/configuration/nntpserverpickupdirectory") = "C:\inetpub\mailroot\picku
Confi.Update
Set ObjSendMail.Configuration = objConfig
ObjSendMail.To=
xxxxxxxxxxxx
xxxxxxxxxx
etc...
Hope this should work.
In case this fails, try to check for ASP for error free.
Thanks.