473,654 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CDO.Message.1 error '80070005' Access is denied. /emailtest.asp, line 9

1 New Member
I am trying to use CDO to send email with attachments using the following code:
Expand|Select|Wrap|Line Numbers
  1. Dim myMail
  2.         Dim mFile1
  3.         mFile1="c:\images\a.gif" 'valid file path, file actually exists
  4.             Set myMail=CreateObject("CDO.Message")
  5.             myMail.Subject="some subject"
  6.             myMail.From=mUserEmail      'valid email address
  7.             myMail.to= mRecipientEmail   'valid email address
  8.             myMail.HTMLBody = "some text"
  9.             myMail.AddAttachment mFile1
  10.             myMail.Send
  11.             set myMail=nothing
1. I get the following error at 'myMail.AddAtta chment mFile1' line of the code.

CDO.Message.1 error '80070005'
Access is denied.
/emailtest.asp, line 9

2. Emails without attachments get sent successfully.

3. Even with attachments,cod e works fine at my devlopment workstation where I have admin rights. However error is produced in other workstations where I do not have admin rights.

How can I solve this problem.

Thanks,
Aug 3 '09 #1
1 8072
Frinavale
9,735 Recognized Expert Moderator Expert
It seems pretty obvious to me....you seem to already know the answer your question. You need to apply the proper permissions to allow your code to use the resource.

The account that is executing the code has to have permissions to use the resource.

Either set permissions on the resource to allow the ASP anonymous user account access to the resource.

Or

Create a user account that has permissions to access the resource and then use impersonation.

Or

If you're using windows authentication at all, ensure that the user account which is using the application has permission to user the resource.

-Frinny
Aug 4 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
23842
by: Mark DuPrey | last post by:
I've got a script in an ASP page that is supposed to extract certain files from a zip file, move them, create a new zip with the moved files and then make a self-extracting archive out of the new zip file. I'm doing this using wshShell.Exec, the WinZip command line tool and zip2exe.exe from the pkware suite (because WinZip's command line doesn't support creating self-extracting archives and for historical compatibility reasons). This is...
1
9012
by: Pai | last post by:
Hello there, I am trying to send a attachemnt using CDO when I try to attach a file to the message, I get the error CDO.Message.1 error 80070005 Access denied
1
16690
by: Fredrik Nilsson | last post by:
Get this Server object error 'ASP 0178 : 80070005' Server.CreateObject Access Error /SendZipFiles.asp, line 40 The call to Server.CreateObject failed while checking permissions. Access is denied to this object. on my win2003 iis6 asp page when component is registered in COM+ service. How do I solve this? How do I allow "out of process" in IIS6?
1
6621
by: Bohous | last post by:
I create an ASP application for Windows 2003 server (Czech) with Exchange 2003. When I want to create new user in Active Directory from my application - this error occurs: Active Directory error 80070005' General Access error denied Web application runs under ADMINISTRATOR account and problematic code is: Set oOU = GetObject("LDAP://test.test.cz/ou=skup,dc=test,dc=test,dc=cz") Set oUser = oOU.Create("User", "cn=" & "Test" & " " &...
1
2356
by: marijuanated | last post by:
Hi, I am getting the following error while trying to access an ASP page. Server object error 'ASP 0178 : 80070005' Server.CreateObject Access Error /hypoccs/Report/PFR85.asp, line 15
2
5292
by: CrystalBlue | last post by:
I've got a silly little problem when I'm trying to map a drive using shell script. Basically, I need the program to open up to a specific folder on a shared server and throw a zip file onto it, then unmap the drive to protect it. I'll place as much of the code as I can here to show you. If fso.FileExists(dirOut) Then fso.DeleteFile dirOut End If Dim Shell : Set Shell = Server.CreateObject("WScript.Shell") Dim objCmd Dim RepoPath :...
1
15041
by: JordanRieger | last post by:
Here is a nasty issue that has been giving me grief for the last couple days. This requires good knowledge of IIS, MSXML, and Windows/NTFS permissions. We have an existing ASP (VBScript) app hosted on IIS 6.0 (W2K3). We need to restrict access to specific users within our company network. To reduce development effort I figured the easiest solution was to enable Integrated Windows Authentication. However once I enable IWA and disable...
6
4486
Carrugar
by: Carrugar | last post by:
I'm running IIS 6.0 on a Win2003 server. One web page is trying to use the new CDO method of sending e-mail but generates the following error: CDO.Message.1 error '80070005' Access is denied. Code: <%
0
5204
AnuSumesh
by: AnuSumesh | last post by:
Hi All, I want to get MAC address of client machine. I am using folllowing code in asp using vbscript: Set objWshShell = Server.CreateObject("WScript.Shell") strToExec = "nbtstat -a " & strComputer Set objEx = objWshShell.Exec(strToExec) But i am getting arror on line "objWshShell.Exec". Error is "WshShell.Exec error '80070005' " Access is denied.
0
8372
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8285
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8591
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2709
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1592
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.