Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Quick MAILTO; question...

Options
  • 03-09-2007 2:55pm
    #1
    Closed Accounts Posts: 79 ✭✭


    Hey just a quick question regarding forms...
    I need the results of the following form to be sent as an email, so when you click the submit button the entire form is sent to my email inbox.
    I ve tried a few times but the default outlook email alert comes up saying i have not set up outlook!
    The thing is, i want it to go to a gmail inbox.

    Here is the html code i've done so far;


    <FORM ACTION="" METHOD="POST" name="" onsubmit="return validate1();">

    <tr>
    <td align="right"><p style="color: #3333FF">Your Name:</p></td>
    <td><INPUT TYPE="text" name= "name" size="20"></td>
    </tr>

    <tr>
    <td align="right"><p style="color: #3333FF">Request:</p></td>
    <td><textarea rows="5" cols="35"></textarea>
    </tr>

    <tr>
    <td align="right"><p style="color: #3333FF">Budget:</p></td>
    <td><INPUT TYPE="text" name= "budget" size="20"></td>
    </tr>


    <tr>
    <td align="right"><p style="color: #3333FF">Email:</p></td>
    <td><INPUT TYPE="text" name= "cust_email" size="20">
    </tr>
    <tr>
    <td align="right"><p style="color: #3333FF">Phone:</p></td>
    <td><INPUT TYPE="text" name= "cust_phone" size="20"></td>
    </tr>

    </tr>
    <td align="right"><p style="color: #3333FF">Please send my answer via:</p></td>
    <td><font color="#000000">
    SMS<input type="checkbox" name="SMS" value="SMS">
    Email<input type="checkbox" name="email" value="email">
    <tr></td>
    <tr>
    <td align="right"><p style="color: #3333FF">Submit Details:</p></td>
    <td><input type="submit" onclick="validate1()" value="Get Quote"> </td>
    </tr>



    </form>


    Thanks a lot.


Comments

  • Closed Accounts Posts: 198 ✭✭sh_o


    using mailto in a form will instruct the client browser (the person filling in the form) to open an email with certain data already entered and ready to be sent from their email client.

    You might be better off posting the form to a server side email handler script in your language of choice, e.g. php, cgi, jsp, asp etc... which sends the complete content of your form without it being necessary for the end user to have their email client properly configured and the configuration message you described below. Google for 'email handler' and you will find lots of examples.


  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    If you use a mailto link as your action then it will open an email with the data entered by the user. Unfortunately this won't work for all users as it is dependent upon the email client and security settings of the user. As such it is preferable to use a server side script to capture, format and email the data instead.

    BTW, what are you doing with your validate1 function?


Advertisement