![]() |
Web Development »
ASP »
General
Intermediate
Attaching Files with CDO MailBy rampdciCDO Mail Description |
Windows, ASP, Visual Studio, Dev
|
||||||||
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
Hello guys here is the code for who search for CDO mailing attachment.
In this case I have used the file attachment based on the no of selected items in Request Page.If the relevant check is done for file download then related files will be added in 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("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"smtpserver"
Flds.update
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)
objMessage.AddAttachment(Server.MapPath(download))
Next
objMessage.fields.update
objMessage.Send
set objMessage = nothing
set objConfig = nothing
Hope you guys can program with it.
Happy Programming!!!
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 22 Jun 2004 Editor: |
Copyright 2004 by rampdci Everything else Copyright © CodeProject, 1999-2009 Web10 | Advertise on the Code Project |