Forums
This topic is locked
select recipient from dropdown & send via CDONTS
Posted 11 Mar 2002 16:50:59
1
has voted
11 Mar 2002 16:50:59 Zain Magsi posted:
Hi,Is there any way to email a form to recipients selected from a dropdown menu using CDONTS? Ie: you fill a form, click on the dropdown to select the person to whom you want to send the email and hit submit to send the content to the "processing" asp page which will email it out.
If this can be done with CDONTS then how should the code below be modified for the "processing page":
<%
Dim objMail
Set objMail = CreateObject("CDONTS.NewMail"

strSender = " "
strReceiver = " "
strSubject = "TEMS Production Request"
strNyRad = CHR(10) & CHR(13)
strBody = strBody & "Name: " & Request.Form("Name"

strBody = strBody & "Phone Number: " & Request.Form("Phone"

strBody = strBody & "Email: " & Request.Form("Email"

strBody = strBody & "Product Name: " & Request.Form("Product_Name"

strBody = strBody & "Version: " & Request.Form("Version"

strBody = strBody & "Title: " & Request.Form("Title"

strBody = strBody & "Technology: " & Request.Form("Technology"

strBody = strBody & "Update Needed: " & Request.Form("Update_Needed"

strBody = strBody & "Newsletter Article idea: " & Request.Form("Newsletter_Article_idea"

strBody = strBody & "Data Sheet: " & Request.Form("Data_Sheet"

strBody = strBody & "OH Presentation: " & Request.Form("OH_Presentation"

strBody = strBody & "Packaging: " & Request.Form("Packaging"

strBody = strBody & "Updates: " & Request.Form("Updates"

strBody = strBody & "New Material: " & Request.Form("New_Material"

strBody = strBody & "Text Needed: " & Request.Form("Text_Needed"

strBody = strBody & "Pictures Needed: " & Request.Form("Pictures_Needed"

strBody = strBody & "Additional: " & Request.Form("Additional"

strBody = strBody & "Draft Requested by: " & Request.Form("Draft_Requested_By"

strBody = strBody & "Release Date: " & Request.Form("Release_Date"

objMail.Send strsender,strReceiver, strsubject, strBody
Zain Magsi<font face='Verdana'></font id='Verdana'>
Edited by - girok on 11 Mar 2002 16:52:20
Edited by - girok on 11 Mar 2002 16:52:52
Replies
Replied 13 Mar 2002 11:22:02
13 Mar 2002 11:22:02 Andrew Watson replied:
On your form, the listbox for recipient should have the recipient names as the Item label and their email address as the value.
ie Listbox form element called Recipient
Item Label = Andrew Watson
Value =
Then you should be able to set the variable
strRecipient using <font color=red>Request.Form("Recipient"
</font id=red>
This should pick up the recipient OK.
Also the listbox could come from a wee database table listing names and email addreses.
Hope This Helps
Andrew
Leedmedia
ie Listbox form element called Recipient
Item Label = Andrew Watson
Value =
Then you should be able to set the variable
strRecipient using <font color=red>Request.Form("Recipient"

This should pick up the recipient OK.
Also the listbox could come from a wee database table listing names and email addreses.
Hope This Helps
Andrew
Leedmedia