I use to use cdont to send out email from my asp page and had no problem
sending out email with an attachment. I have now converted to using cdo
to send out mail. I get an error message when I use the AddAttachment.
If I don't use the attachment, the email will go through. I get the
following error message when using an attachment:

CDO.Message.1 error '80070020'
The process cannot access the file because it is being used by another
process.

I have checked the size of the file and it has 2 lines of records. I
don't know where else to look.

Any suggestions would be greatly appreciated.

Code below:
Dim objMessage
Set objMessage = Server.CreateObject("CDO.Message")

With objMessage
.To = "MyEmail.com"
.From = "MyEmail.com"
.Subject = "Testing Email"
.TextBody = "testing 123"
.AddAttachment "c:\MyDocument\test.txt"
.Send
End With
Set objMessage = Nothing


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Re: CDO.Message.1 error '80070020' when using AddAttachment by Steven

Steven
Tue May 25 16:29:40 CDT 2004

http://aspfaq.com/show.asp?id=2026

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!


"th th" <taveryh@yahoo.com> wrote in message
news:#7uTC8pQEHA.3140@TK2MSFTNGP11.phx.gbl...
>
> I use to use cdont to send out email from my asp page and had no problem
> sending out email with an attachment. I have now converted to using cdo
> to send out mail. I get an error message when I use the AddAttachment.
> If I don't use the attachment, the email will go through. I get the
> following error message when using an attachment:
>
> CDO.Message.1 error '80070020'
> The process cannot access the file because it is being used by another
> process.
>
> I have checked the size of the file and it has 2 lines of records. I
> don't know where else to look.
>
> Any suggestions would be greatly appreciated.
>
> Code below:
> Dim objMessage
> Set objMessage = Server.CreateObject("CDO.Message")
>
> With objMessage
> .To = "MyEmail.com"
> .From = "MyEmail.com"
> .Subject = "Testing Email"
> .TextBody = "testing 123"
> .AddAttachment "c:\MyDocument\test.txt"
> .Send
> End With
> Set objMessage = Nothing
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!