p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 15th, 2009, 12:01 AM
Authorized User
Points: 153, Level: 3
Points: 153, Level: 3 Points: 153, Level: 3 Points: 153, Level: 3
Activity: 2%
Activity: 2% Activity: 2% Activity: 2%
 
Join Date: Jan 2004
Location: , , .
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to creative_eye
Default 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old October 15th, 2009, 03:41 AM
Friend of Wrox
Points: 1,882, Level: 17
Points: 1,882, Level: 17 Points: 1,882, Level: 17 Points: 1,882, Level: 17
Activity: 7%
Activity: 7% Activity: 7% Activity: 7%
 
Join Date: May 2004
Location: India
Posts: 563
Thanks: 0
Thanked 14 Times in 14 Posts
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old October 15th, 2009, 05:15 AM
Authorized User
Points: 153, Level: 3
Points: 153, Level: 3 Points: 153, Level: 3 Points: 153, Level: 3
Activity: 2%
Activity: 2% Activity: 2% Activity: 2%
 
Join Date: Jan 2004
Location: , , .
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to creative_eye
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old October 15th, 2009, 05:56 AM
Friend of Wrox
Points: 1,882, Level: 17
Points: 1,882, Level: 17 Points: 1,882, Level: 17 Points: 1,882, Level: 17
Activity: 7%
Activity: 7% Activity: 7% Activity: 7%
 
Join Date: May 2004
Location: India
Posts: 563
Thanks: 0
Thanked 14 Times in 14 Posts
Default

Please check the following example:
http://www.codeproject.com/KB/asp/sendmail.aspx
__________________
Om Prakash Pant
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Mail Using CDOSYS in ASP artarasan Classic ASP Basics 1 May 12th, 2008 07:11 PM
Form in ASP using CDOSYS webbman75 Classic ASP Basics 2 March 28th, 2007 09:36 PM
Sending email with CDOSYS Tee88 ASP CDO 17 April 19th, 2005 05:00 PM
Sending Email using CDOSYS in ASP asplearner ASP CDO 6 February 16th, 2005 02:48 AM
Sending out Large Email Blasts with CDOSYS Aaron Edwards ASP Pro Code Clinic 0 April 16th, 2004 12:10 PM



All times are GMT -4. The time now is 11:59 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc