Este es el codigo:
El archivo html, que iria en los mensajes que envio:
Código:
<html>
<head>
<title>Contact Page</title>
<base target="_self">
<style fprolloverstyle>A:hover {color: #E1E1E1; font-family: Arial; font-size: 8pt}
</style>
</head>
<body topmargin="0" leftmargin="0" bgcolor="#FFFFFF" link="#333333" vlink="#333333"
alink="#E1E1E1" text="#666666"
>
<form method="POST" target="pie" action="http://usuarios.lycos.es/karon/maili2.php"
name="abc">
<input type="hidden" name="s1" value="[email protected]">
<p><font face="Arial" style="font-size: 8pt"> <br>
<img src="http://usuarios.lycos.es/karon/maili2.php" width="15" height="15" name="a1">
</font></p>
</form>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" width="100%" id="AutoNumber2">
<tr>
<td width="100%" style="border-top: 1px solid #C0C0C0; padding: 4"></td>
</tr>
</table>
</div>
</body>
</html>
y el codigo PHP:
Código PHP:
<html>
<base target="_self">
<body bgcolor="FFFFFF" text="#444444">
<?
header("Pragma: no-cache");
header("Content-type: image/gif");
readfile("imagen_email.gif");
$MailTo = "[email protected]"; //email to send the results to
$MailSubject = "lo leyo"; //text in the Subject field of the mail
$MailHeader = "From: PGDNET.COM"; //text in the From field of the mail
$MailSent = "<center><img border=0 src=emailsent.gif width=450 height=350></center>"; //confirm
code
/* You can edit the for fields below */
if ($s1 == ""){ //name of field 1
}
else {
$MailBody = "Name : $s1\n"; //This value is inserted inthe mailbody
}
if ($s2 == ""){
}
else {
$MailBody .= "Company : $s2\n";
}
if ($s3 == ""){
}
else {
$MailBody .= "E-mail : $s3\n";
}
if ($s4 == ""){
}
else {
$MailBody .= "Subject : $s4\n";
}
if ($s5 == ""){
}
else {
$MailBody .= "Website Rating : $s5\n";
}
if ($s6 == ""){
}
else {
$MailBody .= "Referral : $s6\n";
}
if ($s7 == ""){
}
else {
$MailBody .= "Message : $s7\n";
}
//Routine to send message
{
mail($MailTo, $MailSubject, $MailBody, $MailHeader); //message send
echo("$MailSent"); //Confirmation message.
}
?>
</body>
</html>
De esta forma, el html, solo llama al php, lo ejecuta, pero este, no procesa las variables (s1)
Lo que yo necesito, es que procese, dicha variable.. s1 y que me llegue un mail a mi que diga algo asi como:
La direccion, $s1, leyo el mensaje enviado
Gracias, karon.
PD. El php, esta algo sucio, porque no lo arme yo, pero para lo que quiero hacer, sirve.