How can I send an E-mail without using Document.Write(); I am using PHP, JS, & HTML

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Roachient
    New Member
    • Mar 2012
    • 1

    How can I send an E-mail without using Document.Write(); I am using PHP, JS, & HTML

    Code:
    <div>
        <h3><a href="#">Water Falls</a></h3>
        <div>
    <input type="checkbox" class="check" id="wf6" />WF-06
    <img src="images/WF6t.jpg"/>
    <input type="checkbox" class="check" id="wf7" />WF-07
    <img src="images/WF7.jpg"/></div></div>
    <input type="checkbox" class="check" id="wf6" />WF-06<img src="images/WF6t.jpg"/>    <br /><input type="checkbox" class="check" id="wf7" />WF-07    <div id="output"></div>
        <div><input type="button" id="sub" value="Send Request" /></div>
    
    if (document.getElementById("wf6").checked){
      var wf6 = document.createTextNode("wf6; ");
      document.getElementById("output").appendChild(wf6);
    }
    if (document.getElementById("wf7").checked){
      var wf7 = document.createTextNode("wf7; ");
      document.getElementById("output").appendChild(wf7);
            }
    var out1 = document.getElementById("output").innerHTML;
            $("#sub").click(function() {
      document.write('<a href="mailto:rodney@rodneygarnett.com?subject=I would like a quote:&body='+ out1 +'">Please click me to send the request for a quote.</a><a href="quote.html">Back</a>');
            })
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    send the mail data to PHP and let PHP compose the mail.

    note: mailto requires a mail user agent to be installed on the client, which is often not the case (and unreliable as well, since the user is responsible for sending)

    Comment

    Working...