Hi, first of all thanks for your time.
I wanna send an email from my php page:
u should know that i got this laptop where is installled the apache server and php, im in windows XP, im not using IIS.
SO, i got this script
<?
if (!$HTTP_POST_VARS){
?>
<form action="envia_form_php.php" method=post>
Nombre: <input type=text name="nombre" size=16>
<br>
Email: <input type=text name=email size=16>
<br>
Comentarios: <textarea name=coment cols=32 rows=6></textarea>
<br>
<input type=submit value="Enviar">
</form>
<?
}else{
//i got the form, building the form body
$cuerpo = "Formulario enviado\n";
$cuerpo .= "Nombre: " . $HTTP_POST_VARS["nombre"] . "\n";
$cuerpo .= "Email: " . $HTTP_POST_VARS["email"] . "\n";
$cuerpo .= "Comentarios: " . $HTTP_POST_VARS["coment"] . "\n";
//sendin the email
mail("sidiman2002@hotmail.com","Formulario recibido",$cuerpo);
//thanks for sendind the email
echo "Gracias por rellenar el formulario. Se ha enviado correctamente.";
}
?>
of course there are alot of php email forms more easy and basic, but this one i found it from a friendly page. So anyway, if i use this script or another it show me this warning
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:\program files\apache group\apache\htdocs\envia_form_php.php on line 29
i look my php.ini and this is what i got on th MAIL FUNCTION LINES:
[mail function]
; For Win32 only.
SMTP = localhost ;for Win32 only
sendmail_from= me@localhost.com ; for Win32 only
; For Win32 only.
;sendmail_from = me@localhost.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
what's wrong???