Get ready for BLACK FRIDAY shopping starting in

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" & strNyrad
strBody = strBody & "Phone Number: " & Request.Form("Phone" & strNyrad
strBody = strBody & "Email: " & Request.Form("Email" & strNyrad
strBody = strBody & "Product Name: " & Request.Form("Product_Name" & strNyrad
strBody = strBody & "Version: " & Request.Form("Version" & strNyrad
strBody = strBody & "Title: " & Request.Form("Title" & strNyrad
strBody = strBody & "Technology: " & Request.Form("Technology" & strNyrad
strBody = strBody & "Update Needed: " & Request.Form("Update_Needed" & strNyrad

strBody = strBody & "Newsletter Article idea: " & Request.Form("Newsletter_Article_idea" & strNyrad
strBody = strBody & "Data Sheet: " & Request.Form("Data_Sheet" & strNyrad

strBody = strBody & "OH Presentation: " & Request.Form("OH_Presentation" & strNyrad
strBody = strBody & "Packaging: " & Request.Form("Packaging" & strNyrad
strBody = strBody & "Updates: " & Request.Form("Updates" & strNyrad
strBody = strBody & "New Material: " & Request.Form("New_Material" & strNyrad
strBody = strBody & "Text Needed: " & Request.Form("Text_Needed" & strNyrad
strBody = strBody & "Pictures Needed: " & Request.Form("Pictures_Needed" & strNyrad
strBody = strBody & "Additional: " & Request.Form("Additional" & strNyrad
strBody = strBody & "Draft Requested by: " & Request.Form("Draft_Requested_By" & strNyrad
strBody = strBody & "Release Date: " & Request.Form("Release_Date" & strNyrad


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

Reply to this topic