944,127 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 8668
  • ASP RSS
Dec 20th, 2005
0

cdo using combo box in my form

Expand Post »
HEELO ,
in my asp form i have following fields
1)Name (text box)
2)Job Title (text box)
3)company name (text box)
4)email address (text box)
5)telephone (text box)
6)nature of enquiry (combo box)
combo box consist of following values
a)sales
2)technical service
3)web development
4)employment opportunities

basically my question relate from cdo. when user input all the fields and submit form i receive all the information by email.
for example user input in the text box and select one value from combo bax may be sales then i will receive all the user information in my sales email address.
i have 4 combo box values nad 4 email address.
therefore i want when user select 2) technical services from combo box then how i can receive all user information in my technical service email address.

similarly when user select 3)web development
from combo box then how i can receive all user information in my web development email address .

similarly when user select 4)employment opportunities
from combo box then how i can receive all user information in my employment opportunities email address .

please give me complete info with code.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
faisyshah is offline Offline
27 posts
since Dec 2004
Dec 24th, 2005
0

Re: cdo using combo box in my form

<form name="form1" method="post" action="">
<select name="select">
<option value="email1@something.com">email 1</option>
<option value="email2@something.com">email 2</option>
<option value="email3@something.com">email 3</option>
<option value="email4@something.com">email 4</option>
</select>
</form>

<% ' with the cdo script put "to" email address to the value of the select box %>
Reputation Points: 10
Solved Threads: 2
Junior Poster
william_stam is offline Offline
131 posts
since Mar 2005
Dec 27th, 2005
0

Re: cdo using combo box in my form

sir i want to ask

<form name="form1" method="post" action="">
<select name="select">
<option value="Sales">Sales</option>
<option value="Technical Support">Technical Support</option>
<option value="Employment Opportunities">Employment Opportunities</option>
<option value="Web development">Web development</option>
</select>
</form>

now i have 4 email address according to option values

1)sales@dawn.com
2)support@dawn.com
3)jobs@dawn.com
4)web@dawn.com

a)now i want using cdo when customer select "sales" option then i receive customer info in to sales@dawn.com account,

b)using cdo when customer select "Technical support" option then i receive customer info in to support@dawn.com account,

c)using cdo when customer select "employment opportunities" option then i receive customer info in to jobs@dawn.com account,

d)using cdo when customer select "web development" option then i receive customer info in to web@dawn.com account,

i think for this purpose i need condition .
but i dont know how i can solve it using cdo
Reputation Points: 10
Solved Threads: 0
Light Poster
faisyshah is offline Offline
27 posts
since Dec 2004
Dec 29th, 2005
0

Re: cdo using combo box in my form

ASP Syntax (Toggle Plain Text)
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
  2. <% If request.Form("emailtoad")<>"" Then %>
  3. <%
  4.  
  5. ' Send by connecting to port 25 of the SMTP server.
  6. Dim iMsg
  7. Dim iConf
  8. Dim Flds
  9. Dim strHTML
  10. Dim mailserver
  11.  
  12. mailserver = "mail server" ' enter a valid mail server
  13.  
  14. Const cdoSendUsingPort = 2
  15.  
  16. set iMsg = CreateObject("CDO.Message")
  17. set iConf = CreateObject("CDO.Configuration")
  18.  
  19. Set Flds = iConf.Fields
  20.  
  21. ' Set the CDOSYS configuration fields to use port 25 on the SMTP server.
  22.  
  23. With Flds
  24. .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
  25. .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = mailserver
  26. .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
  27. .Update
  28. End With
  29.  
  30. ' Apply the settings to the message.
  31. With iMsg
  32. Set .Configuration = iConf
  33. .To = Request.Form("email")
  34. .From = "something@something.com"
  35. .Subject = "Subject Goes here"
  36. .HTMLBody = "this is the mails body"
  37. .Send
  38. End With
  39.  
  40. ' Clean up variables.
  41. Set iMsg = Nothing
  42. Set iConf = Nothing
  43. Set Flds = Nothing
  44.  
  45. %>
  46. <% End If %>
  47. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  48. <html>
  49. <head>
  50. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  51. <title>Test</title>
  52. </head>
  53.  
  54. <body>
  55. <form name="form1" method="post" action="">
  56. <select name="emailtoad">
  57. <option selected>Please select a category</option>
  58. <option value="sales@dawn.com">Sales</option>
  59. <option value="support@dawn.com">Technical Support</option>
  60. <option value="jobs@dawn.com">Employment Opportunities</option>
  61. <option value="web@dawn.com">Web development</option>
  62. </select>
  63. <input type="submit" name="Submit" value="Submit">
  64. </form>
  65. </body>
  66. </html>


you will just have to put your other form fields in, im too lazy at the moment to do so.
Reputation Points: 10
Solved Threads: 2
Junior Poster
william_stam is offline Offline
131 posts
since Mar 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: mysqldump from asp
Next Thread in ASP Forum Timeline: Help with asp form will not display contact information





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC