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
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.

11 Years
Discussion Span
Last Post by william_stam

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>

now i have 4 email address according to option values


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

<% If request.Form("emailtoad")<>"" Then %>

' Send by connecting to port 25 of the SMTP server.
Dim iMsg 
Dim iConf 
Dim Flds 
Dim strHTML
Dim mailserver

mailserver = "mail server"   ' enter a valid mail server

Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields

' Set the CDOSYS configuration fields to use port 25 on the SMTP server.

With Flds
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = mailserver 			
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10  
End With

' Apply the settings to the message.
With iMsg
    Set .Configuration = iConf
    .To = Request.Form("email")
    .From = "something@something.com" 
    .Subject = "Subject Goes here"
    .HTMLBody = "this is the mails body"
End With

' Clean up variables.
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

<% End If %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<form name="form1" method="post" action=""> 
<select name="emailtoad">
	<option selected>Please select a category</option> 
	<option value="sales@dawn.com">Sales</option> 
	<option value="support@dawn.com">Technical Support</option> 
	<option value="jobs@dawn.com">Employment Opportunities</option> 
	<option value="web@dawn.com">Web development</option> 
 <input type="submit" name="Submit" value="Submit">

you will just have to put your other form fields in, im too lazy at the moment to do so.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.