send an email from ASP page

S

shan

Hi,
I wish to send the user entered data through email to
the Admin. Iam trying to use CDO object but it gives me
the following message..

Variable is undefined: 'cdoSendUsingMethod'


Following is the piece of code Iam using got from msdn
site. Any help would be greatly appreciatd..thanks, shan

Dim iConf
Dim Flds
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item(cdoSendUsingMethod) =
2 'cdoSendUsingPickup
.Item(cdoSMTPServerPickupDirectory)
= "c:\Inetpub\mailroot\Pickup"
.Update
End With
Set Session("Config") = iConf

Dim iMsg
Set iMsg = CreateObject("CDO.Message")

' use cached settings for Session
Set iMsg.Configuration = Session("Config")
iMsg.To = "(e-mail address removed)"
iMsg.From = "(e-mail address removed)"
'
iMsg.Send
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,117
Latest member
Matilda564
Top