Hi Dear
if you mean to send simple mail from your PHP code...as i understood your problem.....Below is the complete code...
try this link
or see the code below
//used variable in the code are from some form, you will make
//variable are editable or as much you want to create in your form
//simple mail script starts here//
<?php
echo "<p>Thank you, <b>$_POST[name]</b>, for your message!</p>";
echo "<p>Your e-mail address is: <b>$_POST[email]</b>.</p>";
echo "<p>Your message was:<br>";
echo "$_POST[message] </p>";
//start building the mail string
$msg = "Name: $_POST[name]\n";
$msg .= "E-Mail: $_POST[email]\n";
$msg .= "Message: $_POST[message]\n";
//set up the mail
$recipient = "
[email protected]";
$subject = "Form Submission Results";
$mailheaders = "From: My Web Site <
[email protected]> \n";
$mailheaders .= "Reply-To: $_POST[email]";
//send mail
mail($recipient, $subject, $msg, $mailheaders);
?>
//simple mail script ends here//
//mail in HTML Format starts here//
<?php
echo "<p>Thank you, <b>$_POST[name]</b>, for your message!</p>";
echo "<p>Your e-mail address is: <b>$_POST[email]</b>.</p>";
echo "<p>Your message was:<br>";
echo "$_POST[message] </p>";
//start building the mail string
$msg = "<p><strong>Name:</strong> $_POST[name]</p>";
$msg .= "<p><strong>E-Mail:</strong> $_POST[email]</p>";
$msg .= "<p><strong>Message:</strong> $_POST[message]</p>";
//set up the mail
$recipient = "
[email protected]";
$subject = "Form Submission Results";
$mailheaders = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/html; charset=ISO-8859-1\r\n";
$mailheaders .= "From: My Web Site <
[email protected]> \n";
$mailheaders .= "Reply-To: $_POST[email]";
//send the mail
mail($recipient, $subject, $msg, $mailheaders);
?>
//mail in HTML Format ends here//
Regards