
June 8th, 2000, 07:08 PM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 23
|
|
|
CDONTS Mailing.
<i><b>Originally posted by : Padmaja Tallavajhala (coolpersona@hotmail.com)</b></i><br />I have a message that I want to send which is works fine with the sender and to the cc to the sender. But I am problem working with selecting the to part of the code where I have to select the name of the person from the drop-down boxes and on clicking of that person's name, the person becomes the 'To' of the mail. <br /><br />Can anyone help me in gettting this code right ? I am pasting the code below so that one knows what I am talking about.<br />--------------------------------------------------<br /><br /><%@ Language=VBScript %><br /><HTML><br /><HEAD><br /><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"><br /><br /><%<br />' request for all the variables of specialrequests.asp and use that as the body <br />' of the message<br /><br />stEmail = Request.Form("Email")<br /><br />stBody = stBody & "Employee ID: " & Request.Form("EmployeeID") & vbCrLf<br />stBody = stBody & "Employee Name: " & Request.form("empName") & vbCrLf<br />stBody = stBody & "Confidential: " & Request.form("Confidential") & vbCrLf<br />stBody = stBody & "Reason: " & Request.Form("Reason") & vbCrLf<br />stBody = stBody & "Other: " & Request.Form("Other") & vbCrLf<br />stBody = stBody & "Destination: " & Request.Form("Destination") & vbCrLf<br />stBody = stBody & "Air Tickets Needed: " & Request.Form("tickets") & vbCrLf<br />stBody = stBody & "Seating Preference: " & Request.Form("seating") & vbCrLf<br />stBody = stBody & "Date Of Departure: " & Request.Form("departdate") & vbCrLf<br />stBody = stBody & "Departure Time: " & Request.Form("departtime") & vbCrLf<br />stBody = stBody & "Departure AM or PM: " & Request.Form("depart") & vbCrLf<br />stBody = stBody & "Date of Return: " & Request.Form("returndate") & vbCrLf<br />stBody = stBody & "Return Time: " & Request.Form("returntime") & vbCrLf<br />stBody = stBody & "Return AM or PM: " & Request.Form("return1") & vbCrLf<br />stBody = stBody & "Sleep Rooms Needed: " & Request.Form("sleeprooms") & vbCrLf<br />stBody = stBody & "Share Rooms Needed: " & Request.Form("ShareRooms") & vbCrLf<br />stBody = stBody & "Type of Rooms Needed: " & Request.Form("Roomtype") & vbCrLf<br />stBody = stBody & "Date of Arrival: " & Request.Form("arrdterm") & vbCrLf<br />stBody = stBody & "Date of Departure: " & Request.Form("dptdterm") & vbCrLf<br />stBody = stBody & "Rental Car: " & Request.Form("rentalCar") & vbCrLf<br />stBody = stBody & "Car Size Preferred: " & Request.Form("CarSize") & vbCrLf<br />stBody = stBody & "Special Requests: " & Request.Form("requests") & vbCrLf<br /><br />stBody = stBody & vbCrLf & vbCrLf<br /><br />set oMail = server.CreateObject("CDONTS.NewMail")<br /><br />oMail.from = stEmail<br /><br />stSendToCorp = "Corporate Travel Administrator <pcavali@dreeshomes.com>"<br />stSendToSouth = "South Travel Administrator <rheath@dreeshomes.com>"<br /><br /><br />'if stSendToCorp.selected = true then<br /> 'corporate travel Administrator is selected<br />' stTo = "Corporate Travel Administrator <pcavali@dreeshomes.com>"<br />'else<br /> 'Southern travel administrator is selected<br />' stTo = "South Travel Administrator <rheath@dreeshomes.com>"<br />'end if<br />oMail.CC = stEmail<br />oMail.Subject = "Request for Travel Arrangement"<br />oMail.Body = stBody<br /><br />oMail.Send<br /><br />set oMail = Nothing<br /><br />%><br /><br /></HEAD><br /><BODY><br /><br /><script language="javascript"><br />function formOnLoadAdd()<br />{<br /> document.frm2ndDestinationAdd.submit();<br />}<br /><br />function formOnLoad()<br />{<br /> document.frm2ndDestination.submit();<br />}<br /></script><br /><br /><form action="/travel/TravelRequest2.asp" method="post" name="frm2ndDestinationAdd"><br /><br /><%<br />For each item in Request.Form %><br /><Input Name = "<%=item%>" Type = "hidden" VALUE = "<% = Server.HTMLEncode(Request.Form(item)) %>"><br /><% next %><br /><br /><!--first table--><br /><div align="center"><center><table border="1" width="80%" cellspacing="0" cellpadding="0"><br /> <tr><br /> <td width="100%" align="center" bgcolor="#E4E3D3"><font size="-1" face="arial"><strong><%= formatdatetime(now(),vblongdate) %> <%= formatdatetime(now(),vblongtime) %> EST</strong></font></td><br /> </tr><br /> <br /> <tr><br /> <td width="100%" bgcolor="#e4e3d3"><font size="5"><strong><center>The Drees Company </center></strong></font></td><br /> </tr><br /> <br /> <tr><br /> <td width="100%" bgcolor="#e4e3d3"><strong><center>Request for Travel Arrangements</center></strong></td><br /> </tr><br /> <br /> <tr><br /> <td width="100%" valign="top"><hr><br /> </td><br /> </tr><br /></table><br /><div align="center"><center><table border="1" width="80%" cellspacing="0" cellpadding="0"><br /> <tr><br /> <td width="20%" colspan="9" bgcolor="#e4e3d3"><strong><center>Second Destination:</center></strong></td><br /> </tr><br /></table><br /><table><br /> <p><br /> <tr><br /> <td><center><strong>Would you like to make arrangements for a second city ? </strong></center></td><br /> </tr><br /> <tr><br /> <td><br /> <center><input type="button" value="Yes"name=Yes onclick="formOnLoadAdd()"><br /> </td><br /> </tr><br /><br /></table><br /></form><br /><br /><form action="/travel/trvladdnew.asp" method="post" name="frm2ndDestination"><br /><br /><%<br />For each item in Request.Form %><br /><Input Name = "<%=item%>" Type = "hidden" VALUE = "<% = Server.HTMLEncode(Request.Form(item)) %>"><br /><% next %><br /><br /><table> <br /><p><br /> <tr><br /> <td><center><strong>If no, you are ready to submit your travel arrangements. </strong></center></td><br /> </tr><br /> <br /> <tr><br /> <td><center><strong>Please choose the person to whom you would like to submit your travel arrangement . </strong></center></td><br /> </tr><br /> <br /> <tr><br /> <td><br /> <center>Submit To:</center><br /> <center><SELECT id=SendTo name=SendTo style="HEIGHT: 25px; WIDTH: 235px"><br /> <Option value="<%=stSendToCorp%>" selected id=1>Corporate: Padmaja T. Chavali</option><br /> <option value="<%=stSendToSouth%>" id=2>Southern: Robin Heath</option><br /> </select></center><br /> </td><br /> </tr><br /> <br /> <tr><br /> <td><br /> <center><input type="Submit" value="Finished" name=Finished onclick="formOnLoad()"><br /> </td><br /> </tr><br /><br /></table><br /></form><br /></BODY><br /></HTML><br />-----------------------------------------------<br /><br />hoping to hear soon from someone there.<br />Padmaja.<br />
|