PHP Email form<

liunx

Guest
Can anyone point out a good
PHP email form script?

Also, I'm wondering; do I need
to do anything special since its sending
to a email on my website?
<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->

I tried a few PHP scripts but never
really got it working :(and you never finished this thread

<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=31536">http://www.htmlforums.com/showthread.ph ... adid=31536</a><!-- m -->

did you do what I said in my post?<?php

function sendmessage($sender,$subject,$plain,$html,$targetEmail) {


//add From: header
$headers = "From: $sender\r\n";

//specify MIME version 1.0
$headers .= "MIME-Version: 1.0\r\n";

//unique boundary
$boundary = uniqid("----=_NextPart_NLCPN_0000_");

//tell e-mail client this e-mail contains//alternate versions
$headers .= "Content-Type: multipart/alternative" .
"; boundary=\"$boundary\"\r\n\r\n";

//message to people with clients who don't
//understand MIME
$headers .= "This is a multi-part message in MIME format.\r\n\r\n";

//plain text version of message
$headers .= "--$boundary\r\n" .
"Content-Type: text/plain; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode($plain)).
"\r\n";

//HTML version of message
$headers .= "--$boundary\r\n" .
"Content-Type: text/html; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode($html)) .
"\r\n--$boundary--\r\n";

//send message
mail( $targetEmail, $subject, "", $headers);
}

?>It just comes out as a blank page :confused:
Should I save as .htm then re-name .php
once its uploaded?did you try this?

$mail_to = "[email protected]";

//the subject of the email sent by the form
$mail_subject = "LP Contact Form";

mail($mail_to,$mail_subject, "this is a test")

if that doesn't work then you have to talk to your host and tell them it doesn't work.

and rmortega77, you do not need all that bloat to send emails.no work;

I'm gonna contact DotEasy
and ask if I gotta do anything
special if its a email under
same domain as the domain that
is running that script.


I just did alot of surfing
around DotEasy's site, read
its Tutorial on setting up a CGI Email Form.
Guess what? I had to use this special formatting
of my email addie cuz on same domain as the
email form is on!!! I feel so stupid.

I'm going to assume its the same
for a PHP Email script;

For now, just going to use this
CGI Script; although may wish to
use PHP in the future :)
 
Top