473,414 Members | 1,674 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,414 software developers and data experts.

cdo message attachments

Hi using win XP pro and IIS5 to send asp e-mail to Society members. I am
trying to send with an attachment using the following code:-

Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
..Item(cdoSendUsingMethod) = cdoSendUsingPort
..Item(cdoSMTPServer) = "pegasus.intonet.co.uk"
..Update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
With cdoMessage
Set.Configuration = cdoConfig
..From = "we*******@andropause.org.uk"
..To = objrec("email")
..Subject = "The Andropause Society - Member " & objrec("patid")
..HTMLBody = session("text")
..AddAttachment "c:\TAS\conference 2005\TAS Special Resolution Website
23.2.05.doc"
..Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
end if
The message gets set with no error, but the attachment is not attached. Any
idea what I am doing wrong?

Thanks Hugh
Jul 22 '05 #1
1 13402
Hugh - I had the same problem. What seemed to cause it was that I had the attachment file open at the time I executed the AddAttachment command. I had saved the file so it was available to be attached, but it was not being attached. If I CLOSED the file before executing the AddAttachment command, it attached successfully.

Roger Joy
May 19 '06 #2

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

Similar topics

1
by: praba kar | last post by:
Dear All, I am new to python world. I have pasted my code which I used it to build rfc822 format mails for webbased mailing system task(which is like to yahoo.com web interface). Now I am...
1
by: Levi Wilson | last post by:
I have a web service that adds a DIME attachment: public void GetFile(string filename) { SoapContext sc = HttpSoapContext.ResponseContext; DimeAttachment dimeFile = new...
4
by: Liz Patton | last post by:
Here's the exception: System.Exception: Unable to send mail: Could not access 'CDO.Message' object. ---> System.Web.HttpException: Could not access 'CDO.Message' object. --->...
6
by: David Anderson | last post by:
Does anyone know how to drag&drop a message with attachments from Outlook (2002 or 2003) in to a VB.Net windows form. This is really stumping me. I've spent a fair amount of time trying to find a...
8
by: Howard | last post by:
Using visual studio 2005 I am sending an email using a vaiable Dim mail As New MailMessage() and then later setting the recipient address by mail.To = name@domain.co.uk This works fine....
5
by: Robert Dufour | last post by:
I am trying to use framework 1.1 - stuck with it. to send emails from a windows form application. The email messages can have attachments, usually two and they can be either text or sounds (wav...
11
by: Marc Castrechini | last post by:
The business requirement is relatively simple: Automatically open a new mail message using the default mail client (Outlook 2003) and attach a document located on the server. Obviously we need...
130
by: Gianni Mariani | last post by:
Attached example CPP files makes it easier to post code and extract code from posts. It's unimaginable at this time where virtually any news reader is capable of dealing with attachments to stick...
3
by: Steven Allport | last post by:
I am working on processing eml email message using the email module (python 2.5), on files exported from an Outlook PST file, to extract the composite parts of the email. In most instances this...
1
by: budyerr | last post by:
All, I am trying to build a email submission form using asp.net. I currently have a web form page that will upload to my webhosting server, attach to email then delete the file after sending. ...
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
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
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
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.