473,408 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

CDO.Message.1 error 80070005

Pai
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

It sends the email but I get a .dat file in the attachement and gives me eroor

If I send an email without attachment it works fine...

Do I need to do some settting to go about this

the code is as below

Dim mail_Subject
mail_Subject = Request.Form("TextSubject")
Dim mail_Body
mail_Body = Request.Form("TextBody")
Dim file_Attach
file_Attach = Request.Form("FileAttach")

Dim objCDO
Set objCDO = Server.CreateObject("CDO.Message")

Set objConfig = CreateObject("CDO.Configuration")
'Configuration:
Set Flds = objConfig.Fields

Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "111.11.1.11"
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Flds("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
Flds.Update

Set objCDO.Configuration = objConfig

objCDO.To = "sp**@immunetolerance.org"
objCDO.From = "an*******@immunetolerance.org"
objCDO.Subject = mail_Subject

objCDO.HTMLBody = mail_Body
objCDO.AddAttachment file_Attach ' erroe line
objCDO.Send()

set objConfig = nothing
set objCDO = nothing

Thanks in advance,
Srikanth
Jul 19 '05 #1
1 8983
http://www.aspfaq.com/5003

Ray at home

"Pai" <sp**@immunetolerance.org> wrote in message
news:53**************************@posting.google.c om...
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

It sends the email but I get a .dat file in the attachement and gives me eroor
If I send an email without attachment it works fine...

Do I need to do some settting to go about this

the code is as below

Dim mail_Subject
mail_Subject = Request.Form("TextSubject")
Dim mail_Body
mail_Body = Request.Form("TextBody")
Dim file_Attach
file_Attach = Request.Form("FileAttach")

Dim objCDO
Set objCDO = Server.CreateObject("CDO.Message")

Set objConfig = CreateObject("CDO.Configuration")
'Configuration:
Set Flds = objConfig.Fields

Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "111.11.1.11" Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Flds("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 60

Flds.Update

Set objCDO.Configuration = objConfig

objCDO.To = "sp**@immunetolerance.org"
objCDO.From = "an*******@immunetolerance.org"
objCDO.Subject = mail_Subject

objCDO.HTMLBody = mail_Body
objCDO.AddAttachment file_Attach ' erroe line
objCDO.Send()

set objConfig = nothing
set objCDO = nothing

Thanks in advance,
Srikanth

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
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...
1
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...
9
by: =?Utf-8?B?QmFkaXM=?= | last post by:
Hi, I'm using automation and it's working fine when I run it from my local machine. but if I try to access it from another machine it's giving me this Error: Retrieving the COM class factory...
2
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...
1
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...
3
by: Michael Bender | last post by:
Hello everybody, after reinstalling Windows XP (incl. IIS) it is not possible to create new webs on the local IIS in the likeweise reinstalled Visual Interdev 6.0. After typing in the name of...
0
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 " &...
4
by: Mike | last post by:
I have an asp page that is calling the msxml2.dll to open a XML file. When I load the page for the first time I get msxml3.dll error '80070005' Access Denied Error but when I refresh the...
1
by: parmsingh | last post by:
I am trying to use CDO to send email with attachments using the following code: Dim myMail Dim mFile1 mFile1="c:\images\a.gif" 'valid file path, file actually exists Set...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.