Sending a form through Email to selectable address.

Hi All,

I have crated a form to be sent as email in FrontPage 2000. Every thing works fine.

But What I need now is to send the form results to email address depending on user selection. So I added to the form a drop menu contains options and I specified values of these options as email addresses.

Now I want this form to be sent to an email address depending on drop menu selection.

Could any one help?

Thanks all,
SAS
alsaeed_sAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ClassyLinksCommented:
If your server supports ASP you can try this:

In your form properties-->options dialog, in the email results tab put this  <%request.form("Email")%>  (where Email is the name of your drop menu)


Or

In the same place try:

document.FrontPage_Form1.Email
(where your form is called Form1 and the field is email)


Let me know if either of these are successful for you.
0
alsaeed_sAuthor Commented:
Hi ClassyLinks,

Non of them worked..

Any help..

Thanks,
SAS
0
alsaeed_sAuthor Commented:
By the way, my form extension is .HTM and not .ASP and it works for direct email address but when I change it to .ASP it doesn't work providing that my server supports ASP.

Does extension make difference for a form to be sent by email??
0
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

ClassyLinksCommented:
if you are using the FP form wizard and your sever has FP extensions you can use the .htm extension on your pages.

Please post the code for your form and let me take a peek.
0
alsaeed_sAuthor Commented:
This is the form code..

<form method="POST" action="--WEBBOT-SELF--" name="FrontPage_Form1" onsubmit="return FrontPage_Form1_Validator(this)">
        <!--webbot bot="SaveResults" startspan U-File="TicketLog.txt"
        S-Format="HTML/BR" S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE"
        S-Email-Format="TEXT/PRE" B-Email-Label-Fields="TRUE"
        B-Email-ReplyTo-From-Field="TRUE" S-Email-ReplyTo="Email"
        B-Email-Subject-From-Field="FALSE"
        S-Email-Subject="Computer Troble Ticket"
        S-Builtin-Fields="REMOTE_NAME REMOTE_USER"
        S-Email-Address="<%request.form("Email")%>" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot
        bot="SaveResults" endspan -->
        <table border="0" width="130%">
          <tr>
            <td width="22%" align="left"></td>
            <td width="79%"></td>
          </tr>
          <tr>
            <td width="22%" align="left">Badge No.</td>
            <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
              --><input type="text" name="Badge" size="20"></td>
          </tr>
          <tr>
            <td width="22%" align="left">Name</td>
            <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
              --><input type="text" name="Name" size="60"></td>
          </tr>
          <tr>
            <td width="22%" align="left">Job Title</td>
            <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
              --><input type="text" name="JobTitle" size="36"></td>
          </tr>
          <tr>
            <td width="22%" align="left">Email</td>
            <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
              --><input type="text" name="Email" size="60"></td>
          </tr>
          <tr>
            <td width="22%" align="left">Department</td>
            <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
              B-Disallow-First-Item="TRUE" --><select size="1" name="Department">
                <option selected>Select the Department</option>
                <option value="pipelinesB-3150ComputerSupport@exchange.aramco.com.sa">EWPD
                (Admin)</option>
                <option value="PipelinesEWPDComputerSuppport@exchange.aramco.com.sa">EWPD
                (Pumpstations)</option>
                <option value="PipelinesSAPDComputerSuppport@exchange.aramco.com.sa">SAPD</option>
                <option value="PipelinesNAPDComputerSuppport@exchange.aramco.com.sa">NAPD</option>
                <option value="pipelinesB-3150ComputerSupport@exchange.aramco.com.sa">PTSD</option>
              </select></td>
          </tr>
          <tr>
            <td width="22%" align="left">Supervisor Name</td>
            <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
              --><input type="text" name="SupervisorName" size="20"></td>
          </tr>
          <tr>
            <td width="22%" align="left">Supervisor Email</td>
            <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
              --><input type="text" name="SupervisorEmail" size="20"></td>
          </tr>
          <tr>
            <td width="22%" align="left">Telephone</td>
            <td width="79%"><input type="text" name="Telephone" size="20"></td>
          </tr>
          <tr>
            <td width="22%" align="left">Location</td>
            <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
              B-Disallow-First-Item="TRUE" --><select size="1" name="Area">
                <option selected>Select an Area</option>
                <option>EWPD Area I</option>
                <option>EWPD Area II</option>
                <option>EWPD Area III</option>
                <option>Dha B-3175</option>
                <option>Abqaiq</option>
                <option>Dha B-3150</option>
              </select></td>
          </tr>
          <tr>
            <td width="22%" align="left">Equipment ID</td>
            <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
              --><input type="text" name="EquipmentID" size="20"></td>
          </tr>
          <tr>
            <td width="22%" align="left">Vendor of the equipment&nbsp;</td>
            <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
              --><input type="text" name="Vendor" size="20"> Such As (IBM, Dell,
              HP, ..ect)</td>
          </tr>
          <tr>
            <td width="22%" valign="top" align="left">
              <p align="center">Trouble Brief Description</p>
            </td>
            <td width="79%"><textarea rows="2" name="description" cols="45"></textarea></td>
          </tr>
          <tr>
            <td width="22%" align="left"></td>
            <td width="79%"></td>
          </tr>
          <tr>
            <td width="22%" align="left"></td>
            <td width="79%"></td>
          </tr>
          <tr>
            <td width="22%" align="left"></td>
            <td width="79%"><input type="submit" value="Submit" name="Action"></td>
          </tr>
        </table>
      </form>
0
ClassyLinksCommented:
The ="<%request.form("Email")%> won't work if you can't support email.

Which form field are you trying to capture as the destination address??  Is it Email??
0
ClassyLinksCommented:
Also, you have no values specified for your second drop down field.
0
ClassyLinksCommented:
You want the email to go to the value in the Department field, correct??
0
ClassyLinksCommented:
Try This:

<form method="POST" action="--WEBBOT-SELF--" name="FrontPage_Form1" onsubmit="return FrontPage_Form1_Validator(this)">
       <!--webbot bot="SaveResults" startspan U-File="TicketLog.txt"
       S-Format="HTML/BR" S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE"
       S-Email-Format="TEXT/PRE" B-Email-Label-Fields="TRUE"
       B-Email-ReplyTo-From-Field="TRUE" S-Email-ReplyTo="Email"
       B-Email-Subject-From-Field="FALSE"
       S-Email-Subject="Computer Troble Ticket"
       S-Builtin-Fields="REMOTE_NAME REMOTE_USER"
       S-Email-Address="document.FrontPage_Form1.Department" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot
       bot="SaveResults" endspan -->
       <table border="0" width="130%">
         <tr>
           <td width="22%" align="left"></td>
           <td width="79%"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Badge No.</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="Badge" size="20"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Name</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="Name" size="60"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Job Title</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="JobTitle" size="36"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Email</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="Email" size="60"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Department</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            B-Disallow-First-Item="TRUE" --><select size="1" name="Department">
               <option selected>Select the Department</option>
               <option value="pipelinesB-3150ComputerSupport@exchange.aramco.com.sa">EWPD
               (Admin)</option>
               <option value="PipelinesEWPDComputerSuppport@exchange.aramco.com.sa">EWPD
               (Pumpstations)</option>
               <option value="PipelinesSAPDComputerSuppport@exchange.aramco.com.sa">SAPD</option>
               <option value="PipelinesNAPDComputerSuppport@exchange.aramco.com.sa">NAPD</option>
               <option value="pipelinesB-3150ComputerSupport@exchange.aramco.com.sa">PTSD</option>
             </select></td>
         </tr>
         <tr>
           <td width="22%" align="left">Supervisor Name</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="SupervisorName" size="20"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Supervisor Email</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="SupervisorEmail" size="20"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Telephone</td>
           <td width="79%"><input type="text" name="Telephone" size="20"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Location</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            B-Disallow-First-Item="TRUE" --><select size="1" name="Area">
               <option selected>Select an Area</option>
               <option>EWPD Area I</option>
               <option>EWPD Area II</option>
               <option>EWPD Area III</option>
               <option>Dha B-3175</option>
               <option>Abqaiq</option>
               <option>Dha B-3150</option>
             </select></td>
         </tr>
         <tr>
           <td width="22%" align="left">Equipment ID</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="EquipmentID" size="20"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Vendor of the equipment&nbsp;</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="Vendor" size="20"> Such As (IBM, Dell,
             HP, ..ect)</td>
         </tr>
         <tr>
           <td width="22%" valign="top" align="left">
             <p align="center">Trouble Brief Description</p>
           </td>
           <td width="79%"><textarea rows="2" name="description" cols="45"></textarea></td>
         </tr>
         <tr>
           <td width="22%" align="left"></td>
           <td width="79%"></td>
         </tr>
         <tr>
           <td width="22%" align="left"></td>
           <td width="79%"></td>
         </tr>
         <tr>
           <td width="22%" align="left"></td>
           <td width="79%"><input type="submit" value="Submit" name="Action"></td>
         </tr>
       </table>
     </form>
0
alsaeed_sAuthor Commented:
Actually, I tried for some fields including email field..

But Originally, I want to get the destination email from Department field..

I tried ="<%request.form("Department")%> but it didn't work too..

0
ClassyLinksCommented:
see above.
0
alsaeed_sAuthor Commented:
ClassyLinks,

I tried what you posted.. I get the conformation page (No errors) but the email wasn't sent.

What do you think the problem is??

Thanks
0
ClassyLinksCommented:
hmmmm...ok, so we are half-way there.  If you aren't getting any errors, we at least haven't offended the server  8-)

OTOH....no errors makes it harder to debug.

Silly Question:  Are you sure that the email wasn't sent?  It could take a few minutes for FP to communicate with the email server and then the server to send the message.
0
ClassyLinksCommented:
Hi...


I just found this on another site...it looks doubtful to me, but give it a try for a second.

Put this in your Email Results box:  [Department]

Does it work?
0
alsaeed_sAuthor Commented:
Hi ClassyLink..

This way gives an error:

FrontPage Error.
User: please report details to this site's webmaster.


Webmaster: please see the server's application event log for more details.

and I gives an application event:

Microsoft FrontPage Server Extensions:
   http://plweb2 - Error #160005 Message: Bad response from SMTP host'ntdhapmx02': 553 malformed address: <[Department]> .
0
ClassyLinksCommented:
ok..so that doesn't parse the field...I didn't think it would.

the document.frontpage_form1.department should work.

Let up upload your form to my server and try it from there....I'll just insert my address into it and see what happens.
0
alsaeed_sAuthor Commented:
Hi ClassyLinks..
Waiting for your feedback..

Thanks for help..
0
ClassyLinksCommented:
ok...try this:

theForm.Department.value
0
alsaeed_sAuthor Commented:
Hi ClassyLinks,

I have found out that the system accepts any expression with dots like:
form1.department
a.b.c
yes.no.hi

It seems that the server accepts these because he thinks that they are email addresses. So we need to find a way to tell the server that this expression is a field name and not email address.

Thanks

SAS


0
ClassyLinksCommented:
theForm.Department.value doesn't work??  It is telling the server to take the email value from the form field named Department.
0
alsaeed_sAuthor Commented:
I tried it but it doesn't work!!

It seems that it does not know that this is a field name.. and not an email address.
0
ClassyLinksCommented:
Sure it does....it just isn't grabbing the value maybe.  There is no documentation on this on any MS site....that's why it's taking so long to figure it out for you.  The above works for others I have helped here in EE, so I am perplexed.

I wish it would give the 533 error again so that we can see what value it is pulling.

I'm thinking what we might have to do here is create a javascript to do this address rather than letting FP do it.  Obviously it doesn't want to cooperate!
0
ClassyLinksCommented:
alsaeed...what do you want to do???
0
DreamMasterCommented:
Instead of setting the action with frontpage...you'd better handle that with the FrontPage_Form1_Validator(theForm) function

Example:

function FrontPage_Form1_Validator(theForm)
{
// The original lines of the code go here..

// Somewhere here you would check if the email address inputted is valid

// If it is.... and assuming the field containing the
// email address is called "email"

theForm.action = theForm.email.value;
theForm.submit();
}

Cheers,
Max.
0
ClassyLinksCommented:
Hi Dreamy...ummmm....how exactly would alsaeed do that in the FP form results dialog box??  ;-)

That is the problem.

The field is called Department.

Therefore, the value we are trying to pull is theForm.Department.value - which is what I have suggested be put into the email results box of the wizard.

However, alsaeed says that this isn't working.

Do you have any other non-FP suggestions???

I'd like to use ASP, but alsaeed cannot.
0
ClassyLinksCommented:
alsaeed....no response from you for over a week.  How's it going?
0
ClassyLinksCommented:
alsaeed....please respond.  EE is only helpful if you respond to all suggestions, even if it is only to tell us it still isn't working.
0
ClassyLinksCommented:
alsaeed....are you there?
0
alsaeed_sAuthor Commented:
Hi all,
 Sorry for this delay..

I has some problems in my email so that I didn't know about the new added comments..

Still I could not find a solution for that..
I 'll try Dream Master solution and get back to you shortly

Saeed
0
DreamMasterCommented:
*nods*

Ok....Classy and I will wait...

Max.
0
alsaeed_sAuthor Commented:
Hi All,

Where can I find "FrontPage_Form1_Validator" function?

I found that it being referenced by the form as follows:
onsubmit="return FrontPage_Form1_Validator(this)
But where is it?

Any comments?
0
ClassyLinksCommented:
That's the problem alsaeed....you don't have any way to mess with that.  The validator script isn't "written" until you publish the page.  You won't find it anywhere in the HTML prior to publishing.
0
alsaeed_sAuthor Commented:
I normally edit my Web site from the web server directly.. do I need to publish it??

alSaeed
0
ClassyLinksCommented:
You edit it "live" on the server?  That should serve the same function as publishing.  Just as long as you are not editing it locally and only ftping it....this form wizard will not work that way.
0
alsaeed_sAuthor Commented:
Yes, I am working on the service (Live)..
What should I do to view that function if it's needed?
0
ClassyLinksCommented:
To view "FrontPage_Form1_Validator" function  You would have to edit in notepad directly and forget about using FP to make any changes.
0
alsaeed_sAuthor Commented:
DreamMaster,

I added the two lines below you provided to the function FrontPage_Form1_Validator(theForm):
theForm.action = theForm.email.value;
theForm.submit();

But I get nothing!

...
I'm still stuck..
0
alsaeed_sAuthor Commented:
50 points more..
0
ClassyLinksCommented:
alsaeed..

Adding points to this question isn't the answer.

Are you prepared to do this page ENTIRELY in notepad and not open it again in FP?  Are you prepared to DITCH the FP wizard so that we can do this manually?

If the answer to the above is YES, then we can help.  Otherwise we cannot mess with the code that FP spits out.
0
alsaeed_sAuthor Commented:
ClassyLinks,

I added more points because you are paying allot of effort to help, so I think it is your right to get more point as you spend more time.. Isn't it??

The answer to your questions is Yes, I can use notepad instead.

Thanks
0
ClassyLinksCommented:
Ok...you can use notepad...great!

<I just made the comment about points because I don't want you locking up points and not being able to ask other questions if this takes us a while.  Just an opinion, but my general way to handle the point thing when I am a questioner is to increase the points when I accept the answer.  I may mention it along the way, but if a question is worth this many points and the Experts are sticking with you <wink> they won't go away after x number of days, no matter what the points are.>

I know you cannot use ASP, so we will have to do this with javascript.

Dreamy, you surpass me in the JS area.....before I start plugging away, do you have any ideas??
0
alsaeed_sAuthor Commented:
My server supports ASP.. so It can be used.



0
DreamMasterCommented:
If you can use Notepad (or any other editor besides FP for that matter I would almost suggest rewriting the entire Form page...as you certainly don't want to be messing with the FP code trying to change that.....

If you could show a link to where I can find the form...explain exactly what needs to be done on submitting the form I will rewrite the code for you explaining exactly what happens...

Max.
0
alsaeed_sAuthor Commented:
The form is posted on the top of this question.
I want basically to send the form results to an email address depending on user selection.
For example
I added a drop menu to the form allowing user to specify his/ her department.
So, If the user from department A, the from will be sent to email address X
If department is B, the email will be sent to address Y and so on.

That is the whole idea
0
DreamMasterCommented:
Ok...as soon as I have some time I will be working on this for you... :-)

Max.
0
ClassyLinksCommented:
Alsaeed...looking for a server side solution here.  I know you don't have ASP, but do you have access FormMail??
0
DreamMasterCommented:
He does have ASP Classy...look at his later comments..

Max.
0
ClassyLinksCommented:
This thread is getting too long for my little blonde brain.

Alsaeed, can you use ASP?  If you can and your server has CDONTS, we can avoid this whole disaster.
0
DreamMasterCommented:
Yes...simply post to a new ASP page that will send the email using the CDONTS object very easy...

Max.
0
ClassyLinksCommented:
Exactly.  Then we can stop trying to force a FP component to do something it was never intended for.
0
DreamMasterCommented:
Put into your original page

<form action="sendMail.asp">

and in sendMail.asp:
======================

<%
 Dim objMail
 Set objMail = server.createobject("CDONTS.NewMail")
 objMail.Send("me@company.com", "you@company.com", "Hello", _
                  "I sent this in 3 statements!", 0)
 Set objMail = nothing
%>

Max.
0
ClassyLinksCommented:
Change the page to form.asp.

If your server supports CDONTS & ASP, this should work for you.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Badge No</title>
</head><%
Select Case Request.QueryString("action")
      Case "save"

            
            SendEmailNotification
                                 
                           
'Now, we give them the option of returning to your home page.
    %>


<body topmargin="0" marginheight="0" leftmargin="0" marginwidth="0">
<p></P><P align="center">
    <%response.write"<I>Your trouble ticket has been submitted.   We will respond ASAP.<br><br><A HREF='http://yourhomepage.com'>Click here to go back to the Home Page</I></A></p>"
   
      Case Else
%>

<form method="POST" action="form.asp?action=save" onSubmit="return FrontPage_Form1_Validator(this)">
              <table border="0" width="130%">
         <tr>
           <td width="22%" align="left"></td>
           <td width="79%"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Badge No.</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="Badge" size="20"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Name</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="Name" size="60"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Job Title</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="JobTitle" size="36"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Email</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="Email" size="60"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Department</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            B-Disallow-First-Item="TRUE" --><select size="1" name="Department">
               <option selected>Select the Department</option>
               <option value="pipelinesB-3150ComputerSupport@exchange.aramco.com.sa">EWPD
               (Admin)</option>
               <option value="PipelinesEWPDComputerSuppport@exchange.aramco.com.sa">EWPD
               (Pumpstations)</option>
               <option value="PipelinesSAPDComputerSuppport@exchange.aramco.com.sa">SAPD</option>
               <option value="PipelinesNAPDComputerSuppport@exchange.aramco.com.sa">NAPD</option>
               <option value="pipelinesB-3150ComputerSupport@exchange.aramco.com.sa">PTSD</option>
             </select></td>
         </tr>
         <tr>
           <td width="22%" align="left">Supervisor Name</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="SupervisorName" size="20"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Supervisor Email</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="SupervisorEmail" size="20"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Telephone</td>
           <td width="79%"><input type="text" name="Telephone" size="20"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Location</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            B-Disallow-First-Item="TRUE" --><select size="1" name="Area">
               <option selected>Select an Area</option>
               <option>EWPD Area I</option>
               <option>EWPD Area II</option>
               <option>EWPD Area III</option>
               <option>Dha B-3175</option>
               <option>Abqaiq</option>
               <option>Dha B-3150</option>
             </select></td>
         </tr>
         <tr>
           <td width="22%" align="left">Equipment ID</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="EquipmentID" size="20"></td>
         </tr>
         <tr>
           <td width="22%" align="left">Vendor of the equipment&nbsp;</td>
           <td width="79%"><!--webbot bot="Validation" B-Value-Required="TRUE"
            --><input type="text" name="Vendor" size="20"> Such As (IBM, Dell,
             HP, ..ect)</td>
         </tr>
         <tr>
           <td width="22%" valign="top" align="left">
             <p align="center">Trouble Brief Description</p>
           </td>
           <td width="79%"><textarea rows="2" name="description" cols="45"></textarea></td>
         </tr>
         <tr>
           <td width="22%" align="left"></td>
           <td width="79%"></td>
         </tr>
         <tr>
           <td width="22%" align="left"></td>
           <td width="79%"></td>
         </tr>
         <tr>
           <td width="22%" align="left"></td>
           <td width="79%"><input type="submit" value="Submit" name="Action"></td>
         </tr>
       </table>
     </form><%

' This part specifies the format and contents of the email message

Sub SendEmail(strFrom, strTo, strSubject, strBody)
      ' DB and email object vars for email notification
      Dim objCDOMail

            Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

            objCDOMail.From = strFrom
            objCDOMail.To = strTo
            objCDOMail.Subject = strSubject
            objCDOMail.Body = strBody

            ' Send the message!
            objCDOMail.Send
            Set objCDOMail = Nothing
End Sub ' SendEmail


Sub SendEmailNotification()
      
      SendEmail _
                                    "request.form('email')", "request.form('Department')", "A new trouble ticket has been submitted.", _
                                    "Please address this issue:" & vbcrlf &_
                                    "Badge No:  & request.form("Badge") & vbcrlf &_
                                    "Name:  & request.form("Name") & vbcrlf &_
                                    "Job Title:  & request.form("JobTitle") & vbcrlf &_
                                    "Supervisor Name:  & request.form("SupervisorName") & vbcrlf &_
                                    "Telephone:  & request.form("Telephone") & vbcrlf &_
                                    "Location:  & request.form("Location") & vbcrlf &_
                                    "Equipment ID:  & request.form("EquipmentID") & vbcrlf &_
                                    "Vendor:  & request.form("Vendor") & vbcrlf &_
                                    "Description of problem:" & vbcrlf
                                    request.form("description") & vbcrlf
                                    

End Sub 'SendEmailNotification

End Select
%>
 </body>

</html>

The only line I'm worried about is:

"request.form('email')", "request.form('Department')", "A new trouble ticket has been submitted.", _


It may need to be changed to:
"&request.form('email')&", "&request.form('Department')&", "A new trouble ticket has been submitted.", _

To get it to work or we may need to do this:

email = request.form("email")
department = request.form("department")

And then use:

"&email&", "&department&", "A new trouble ticket has been submitted.", _
0
alsaeed_sAuthor Commented:
Classy,

I tried this form and all three options you supplied, but I got an error message:

Technical Information (for support personnel)

Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/asp_ticket2.asp, line 151
"&email&", "&department&", "A new trouble ticket has been submitted.", _

and every time I change the descried live it displays it in the error message.
0
ClassyLinksCommented:
Sorry.

That

Send Email_ should read:

request.form("email"), request.form("department"), "A new trouble ticket has been submitted.", _
                              "Please address this issue:" & vbcrlf &_
                              "Badge No: " & request.form("Badge") & vbcrlf &_
                              "Name: " & request.form("Name") & vbcrlf &_
                              "Job Title:  "& request.form("JobTitle") & vbcrlf &_
                              "Supervisor Name:  "& request.form("SupervisorName") & vbcrlf &_
                              "Telephone:  "& request.form("Telephone") & vbcrlf &_
                              "Location:  "& request.form("Location") & vbcrlf &_
                              "Equipment ID:  "& request.form("EquipmentID") & vbcrlf &_
                              "Vendor:  "& request.form("Vendor") & vbcrlf &_
                              "Description of problem:" & vbcrlf &_
                              request.form("description") & vbcrlf


You can test it at http://classylinks.ca/alsaeed/form.asp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
alsaeed_sAuthor Commented:
Thanks Classy..

My email server is down now..

Once it's back, I'll try it and get back to you..

Alsaeed
0
alsaeed_sAuthor Commented:
Hi Classy,

I copied the form you made to my web server but when I click Submit, I get the form again with empty fields instead of viewing the (feedback form that you wrote) and the email was not sent.

Did I do mistake?

Thanks again Classy
0
ClassyLinksCommented:
Questions:

Did you save it as .asp?
Does your server have CDONTS?
Did you try it on my site?  Did the email get to you from there?
Do you want me to send it to you by email?
0
alsaeed_sAuthor Commented:
1. Yes, it is as .asp.
2. I don't know. How do I check for CDONTS?
3. Yes. I tried it on yours, but I did get any emails!

Thank you.

 
0
ClassyLinksCommented:
3. Yes. I tried it on yours, but I did get any emails!

You did or didn't??

Are your email addresses in the form correct? pipelinesB-3150ComputerSupport@exchange.aramco.com.sa

Ask your server admin about the CDONTS....the email section will not work without them.....however, if they are not installed, you would get an error stating that it couldn't create the object.  That is IF you can process ASP at all.  The fact that the script isn't even giving you the confirmation message leads me to believe that it is not processing any of the ASP.

As you will see, the one I posted on my server has an additional option in the email addresses section.  It sends an email to me.  Try it and I will post here when I get the email, or I can forward it to you.
0
alsaeed_sAuthor Commented:
Sorry for this misspelled word.
I didn't receive any emails.

I am sure that my server supports ASP but I have no idea about CDONTS.

Could you please tell me how to check for CDONTS since I have administrative privileges on my web server.

Thanks

0
ClassyLinksCommented:
I am not an administrator....but I do know that you need IIS 4 (at least) to run CDONTS.  It is usually an addition to your SMTP service.
0
alsaeed_sAuthor Commented:
Classy,

Thank you very Much
It works!!!

The problem was when I tried to view the form source (trough IE) that you linked to your website it doesn't show the complete source for the form.. so that I get incomplete form.

But what I did is copying the form your posted then copy the modification you made later.

Thank you again
0
ClassyLinksCommented:
Great!  Glad we finally got it working.  And remember that you can never view the source code of an ASP file in IE.  ASP code is parsed into HTML, so it is hidden from the viewer.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.