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 7 of 7

Thread: send email form

  1. #1
    New Coder
    Join Date
    Dec 2007
    Posts
    82
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Post send email form

    i can't seem to find an example of sending email using html..

    i was searching for something like this but i won't be using php just plain html...

  • #2
    New to the CF scene
    Join Date
    Jan 2010
    Location
    Massachusetts
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Are you talking about sending an HTML email? Or, using HTML on your site to send an email to...

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello sher_amf,
    You could use a mailto.

    Like this -
    Code:
    <p>
    This is a mail link:
    <a href="mailto:name@yahoo.com?subject=Hello%20again">E-Mail me</a>
    </p>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #4
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    If you are looking specifically to e-mail form data to yourself (or whatever address you need) I think you can create a CGI script to do that for you. Try a google search for it.

    Most developers use PHP or similar though. Is there some reason that you can't do this in PHP or do you just not want to do this in PHP?
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #5
    New Coder
    Join Date
    Dec 2007
    Posts
    82
    Thanks
    10
    Thanked 0 Times in 0 Posts
    thanks! it was helpful!

    what i used is make the action of the form send to a php page....

    but i have a problem the sending of email is already working but the format i get in my email doesn't work..

    this is the message i receive in my email
    <u>message of the customer: </u>hello i want to order<br/><u>contact of the customer: </u>9872349<br/><u>From: </u>michael
    here is the code of my php page
    Code:
    <html>
    <body>
    <?php
     $to = 'email@yahoo.com';
     $email = $_REQUEST['email'] ;
     $subject = 'INquiry' ;
     $message = "<u>"."message of the customer: "."</u>".$_REQUEST['message'].
     '<br/>'."<u>"."contact of the customer: "."</u>".$_REQUEST['contact'].
     '<br/>'."<u>"."From: "."</u>".$_REQUEST['name'] ;
     $headers = 'From: '.$_REQUEST['name'] ;
     echo "Your customer's email add: ".$email."<br/>". "subject of the email: ".$subject."<br/>" .$message."<br/>" .$headers;
    mail($to,$subject,$message,$headers);
    ?>
    
    </body>
    </html>

  • #6
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    Using javascript you can cause the body text to have a new line within the text you pre-populate by using the ASCII characters for a carriage return (%0D) and line feed (%0A), as in:

    var body_message = "Name "+ Name + "%0D%0A" + "Address " + Address +"%0D%0A";

    Another way is to use escape("\n") as in -

    var body_message = "Name "+ Name + escape ("\n") + "Address " + Address + escape ("\n");


    In both cases be sure to test it with the relevant browser/email client combinations before relying on it for mission-critical email processing. But they both work in IE/Outlook.
    Last edited by Philip M; 01-14-2010 at 08:07 PM.

  • #7
    New to the CF scene
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If u need HTML contact form for ur Website....so u can go to Emailmeform.com

    This site has very good form Format and u also can maintain the form according to ur Way...I am also using this site form in My all website and it works really great.

    check form on my website :

    Thanks
    Last edited by Apostropartheid; 01-23-2010 at 04:03 PM.


  •  

    Posting Permissions

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