|
|
 |
| User Groups - Other Developer User Groups Post your announcements about user groups for developer audiences other than INETA and LUGs |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the User Groups - Other Developer User Groups section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

October 15th, 2009, 12:01 AM
|
|
Authorized User
|
|
Join Date: Jan 2004
Location: , , .
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ASP - sending form with CDOSYS
Hi,
I'm a newbie and I'm creating this page first time. I've a form with 15 fields and I want to send the information in my email using ASP CDOSYS. I found solutions online but those are limited to fields: To, From, Subject and Message.
As I mentioned I've 15 fields in my form, how could I send these fields values in my email.
Any help would be greatly appreciated. Thanks in advance.
|

October 15th, 2009, 03:41 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Location: India
Posts: 563
Thanks: 0
Thanked 14 Times in 14 Posts
|
|
When form is submitted, you can write the following code.
Code:
<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "<enter_mail.server_here>"
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
Dim txtBody
With cdoMessage
Set .Configuration = cdoConfig
.From = "from@me.com"
.To = "to@me.com"
.Subject = "Sample CDO Message"
'You can add all the form fields you want..
txtBody = "Field1 : " & Request.form("Field1")
txtBody = txtBody & "Field2 : " & Request.form("Field2")
.TextBody = "This is a test for CDO.message" & txtBody
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
http://classicasp.aspfaq.com/email/h...-with-cdo.html
__________________
Om Prakash Pant
|

October 15th, 2009, 05:15 AM
|
|
Authorized User
|
|
Join Date: Jan 2004
Location: , , .
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I've tried this code, but it says "The page cannot be displayed"
I've checked in the form action, and it was the right file name.
|

October 15th, 2009, 05:56 AM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Location: India
Posts: 563
Thanks: 0
Thanked 14 Times in 14 Posts
|
|
__________________
Om Prakash Pant
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |