Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to send form content by email

    One question I am frequently asked is how to send form content by email using only HTML or JavaScript/ vbscript ...

  • #2
    New Coder
    Join Date
    Dec 2006
    Location
    Bahrain
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <form action="mailto:a@b.com">
    <textarea cols="15" rows="12">
    Bla bla bla bla bla bla bla
    </textarea>
    </form>
    ALWAYS remember to validate your code

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,627
    Thanks
    0
    Thanked 648 Times in 638 Posts
    That wont work in all modern browsers as the mailto: is an instruction to open the locally running email program. For sending emails that work in all browsers you either put the mailto: in a link so that the person can create the email themselves or use a server side form2mail script to translate the form into an email. If you can't install server side scripts then you can use one hosted by a third party such as Bravenet.
    Last edited by felgall; 12-24-2006 at 07:37 PM.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •