Click here to Skip to main content
14,133,823 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


19 bookmarked
Posted 22 Jun 2004
Licenced CPOL

Attaching files with a CDO mail

, 22 Jun 2004
Rate this:
Please Sign up or sign in to vote.
Code for who search for CDO mailing attachments.


Hello guys, here is the code for who search for a CDO mailing attachment. In this case, I have used the file attachment based on the number of selected items in the Request page. If the relevant check is done for the file download, then the related files will be added in the attachment and sent as mail.

'++++++++++= CDO Mail ++++++++++++++++

set objMessage = createobject("cdo.message")
set objConfig = createobject("cdo.configuration")

' Setting the SMTP Server
Set Flds = objConfig.Fields
Flds.Item("") = 2
Flds.Item("") = 

Set objMessage.Configuration = objConfig
objMessage.To = strRecipientString
objMessage.From = strFromString
objMessage.Subject = strSubject
objMessage.TextBody = strMessageBody

'--------- Attach the files -----------

For i=1 to counter
FreeTools = Request.Form("dowloadfile")(i)



set objMessage = nothing
set objConfig = nothing

Hope you guys can program with it.

Happy programming!!!


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

India India
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionHow do you attach files that the user submits through a form? Pin
deprivedwriter26-Sep-08 6:19
memberdeprivedwriter26-Sep-08 6:19 
GeneralAttaching a PDF On-the-fly Pin
TWZDegen31-Oct-06 10:35
memberTWZDegen31-Oct-06 10:35 
GeneralRe: Attaching a PDF On-the-fly Pin
Rothariger7-Feb-07 9:58
memberRothariger7-Feb-07 9:58 
QuestionAn error occurs evrytime Pin
live n let live28-Apr-06 0:03
memberlive n let live28-Apr-06 0:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.190518.1 | Last Updated 23 Jun 2004
Article Copyright 2004 by rampdci
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid