codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Jmail form question.  Solace at 22:25 on Thursday, October 02, 2003
 

Hello all,
I am a beginner at ASP and I recently built a simple form mail. It worked fine, but now I want to make it a little more complicated. Instead of a user filling out the form and sending it off, I want them to use a menu list to select who they want to contact. Then they could fill out the form and when they press send it will go to the appropriate party.
Here is the script:

<%
Set JMail = Server.CreateObject("JMail.Message")
JMail.ISOEncodeHeaders = False
JMail.From = Request.Form("Email")
JMail.Subject = "Thank you...."
JMail.AddRecipient "someone@somedomain.com"
JMail.Priority = 1
JMail.Send("mail.somedomain.com")
%>

So you can see it is very simple. I have added the menu list and assigned values to all the recipients. I just dont know how to tie it in with the script.

Any help appreciated.

  Re: Jmail form question.  Troy Wolf at 22:38 on Friday, October 03, 2003
 

You know how to code the mail script. You know how to create an HTML form that prompts for an email address. You know how to pass that "Email" value to the mail script. Seems like you'd know how to pass a Recipient value to the script. In any case, just modify your mail code like this:
<%
Set JMail = Server.CreateObject("JMail.Message")
JMail.ISOEncodeHeaders = False
JMail.From = Request.Form("Email")
JMail.Subject = "Thank you...."
Recipient = Request.Form("Recipient")
JMail.AddRecipient Recipient
JMail.Priority = 1
JMail.Send("mail.somedomain.com")
%>


Then add a Recipient dropdown to your HTML form like this:
<select name="Recipient">
<option value="troy@shinysolutions.com">Troy Wolf</option>
<option value="david@codetoad.com">David Bruce</option>
<option value="bob@aol.com">Bob Smith</option>
</select>
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: Jmail form question.  Solace at 01:11 on Saturday, October 04, 2003
 

Thanks Troy, Im learning all this one step at a time. I appreciate your help.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Digital.Canal.Software.V2013
•  Altair_HyperWorks_12.0.1_Win64
•  Global.mapper.V15.0
•  ESI.PAM-RTM.V2010.0
•  KISSsoft.03.2013E.SP5
•  Technical.Toolboxes.Pipeline.Toolbox.2013.Enterprise.v15.0.0
•  Simprotek.Simprosys.V3.0
•  Ricardo.SABR.V6.0p1
•  PSIM.V9.2


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2013