hey guys,

I am about to pull my hair out... im still pretty new to php, and I am looking for a GOOD php form to html email script...

I have tried about 8 different scripts, including one I paid for, and I just cannot seem to get one that works properly... the issues I am having is either im getting errors when submitting the form, form submission is successful I get directed to the thankyou page and then never receive an email, or I will get one that I cant change the from name and address when it appears in outlook...

Does anyone know where I can get a GOOOD script from that is going to allow me to send an email from my page, that will actually arrive, and in HTML???

Chris

    If you want to post up the script you had the most success with, I'd be happy to assist you in getting it working.

    The one that you can't change the from name and address sounds like a good one to modify.

      Ok... well here is one of the scripts I have been trying to get working...

      it works fine except it wont sent the message to my email in html format...

      the form is here:

      <form action="sendmail.php" method="post">
      Name: <input type="text" name="newfname" /><br />
      Email: <input type="text" name="newemail" /><br />
      Message: <input type="text" name="newmessage" /><br />
      <input type="submit" name="submit_form" value="Submit" />
      </form>

      and the sendmail.php is here:

      <?php
      if (!isset($_POST['submit_form'])):
      ?>
      <html>
      <head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"> <form action="<?=$HTTP_SERVER_VARS['PHP_SELF']?>" method="post"> Name:<input type="text" name="newfname" size="35" value=""><br>
      
      
      Email:<input type="text" name="newemail" size="35" value=""><br> <input type="submit" name="submit_form" value=""> </form> </body> </html> <?php else:
      $newfname = $_POST['newfname'];
      $newemail = $_POST['newemail'];
      $qc = $_POST['qc'];
      // Send html autoresponder email or whatever $to = $newemail; $subject = "Dear $newfname, thank you for subscribing"; 
      $message = "
      <html>
      <head>
      <title></title>
      </head>
      <body>
      <font style=\"font-family:tahoma, arial, verdana;font-size:10pt\"> Dear $newfname, <p>Thank you and whatever else I want this to say</p>
      
      </font>
      </body>
      </html>
      ";
      $headers  = "MIME-Version: 1.0\r\n";
      $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .="From:CHRIS <example@example.com>\r\n"; mail($newemail, $subject, $message, $headers); // Done sending autoresponder $date = date("F j, Y, g:i a" ); // Notify the new submission to the administrator $to = "example@example.com"; $subject = "Subscribe Me please"; 
      $message = "
      <h1>The following submission has been received.</h1>
      <span style='font-weight:bold'>Name:</span> $newfname $newlname
      <span style='font-weight:bold'>Email:</span> $newemail
      
      $qc
      
      <h2>Bottom of page</h2>
      ";
      $header = "From:My Newsletter <example@example.com>";
      mail($newemail, $subject, $message, $header);
      // Done notifying to administrator
      ?>
      <html>
      <head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      </head>
      <body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
      <font style="font-family:tahoma, arial, verdana;font-size:10pt">
      Dear <?=$newfname?>,
      <h1>Thank you for subscribing. Someone will probably get in touch with you sometime<//h1>
      
      
      
      </font>
      </body>
      </html>
      <?php endif; ?> 
      
      
      

      if you want to see this script in action goto http://www.350finale.co.nz/admin/email

      Cheers

        So neither message is coming in HTML? The second shouldn't due to no HTML content type headers being sent.

        You should change it to:

        $header = "FROM: My Newsletter <example@example.com>\r\nContent-type: text/html; charset=ISO-8859-1\r\n";
          Write a Reply...