Como enviar um email em PHP de forma confiável?

Estou aprendendo a enviar um email. Instalei o appserver e nos arquivos php.ini-dist e php.ini-recommended, fiz as seguintes alterações

SMTP=localhost

[email protected]

Substituí localhost por mail.ptcl.net, que é meu provedor dsl, e substituí [email protected] pelo meu endereço de e-mail [email protected]

recebo a seguinte mensagem quando envio o formulário

"warning: mail () [function.mail]:" sendmail_from "não definido no php.ini ou no cabeçalho personalizado" De: "ausente no C: \ AppServ \ www \ Hamza \ send_simpleform.php na linha 14 O seguinte email foi enviado:

Hamza: hamza

[email protected]

Mensagem: adasdas "

A seguir está o script que estou usando

<html>
<head>
<title>Simple Feedback Form</title>
</head>
<body>
<form method="post" action="send_simpleform.php"/>
<p><strong>Your name</strong><br/>
<input type="text" name="sender_name" size="30" /></p>
<p><strong>Senders Email address</strong><br/>
<input type="text" name="sender_email" size="30" /></p>
<p><strong>Enter your Message here</strong><br/>
<textarea name="message" cols="30" rows="5" wrap="virtual"></textarea></p>
<p><input type="submit" value="send this form" name="submit"/></p>
</form>
</body>
</html>


<?php
if(($_POST[sender_name]=="")||($_POST[sender_email]="")||($_POST[message==""]                                                                                                          ))
{   header("location=simple_form.html");
    exit;
}
$msg="E-MAIL SENT FROM WWW SITE\n";
$msg="Sender's Name:  $_POST[sender_name]\n";
$msg="Sender's E-Mal I.D:    $_POST[sender_email]\n";
$msg="Message:                 $_POST[message]\n";
$to="[email protected]";
$subject="Web site feedback";
$mailholders="from my website<[email protected]>\n";
$mailheader="Reply-to: $_POST[sender_email]\n";
mail($to, $subject,$msg,$mailheaders);
?>
<html>
<head>
<title>Simple Feedback Form Sent</title>
</head>
<body>
<h1>The following e-mail has been sent:</h1>
<p><strong>Hamza:</strong><br\>
<?php echo "$_POST[sender_name]";?>
<p><strong>[email protected]</strong><br\>
<?php echo "$_POST[sender_email]";?>
<p><strong>Message:</strong><br>
<? echo "$_POST[message]";?>
</body>
</html>

questionAnswers(4)

yourAnswerToTheQuestion