Ver Mensaje Individual
  #4 (permalink)  
Antiguo 10/02/2011, 09:24
st0nk
 
Fecha de Ingreso: julio-2005
Mensajes: 23
Antigüedad: 18 años, 10 meses
Puntos: 0
Respuesta: Problemas con planillas de contacto

Cuando trato de hacer envio, me dice lo siguiente:

Parse error: syntax error, unexpected '.' in /home/planific/public_html/sendmail.php on line 25


Los codigos nuevamente:

Código:
<?php

$mailto = "[email protected],[email protected]";
$messagesubject = "Email enviado desde la web";

$author = $_POST['author'];

$fromaddress = $_POST['email'];

if(isset($_POST['telf'])){
$telf = $_POST['telf'];
}else{$telf = "No coloco telefono";}

if(isset($_POST['ciudad'])){
$ciudad = $_POST['ciudad'];
}else{$ciudad = "No coloco ciudad";}

$body = $_POST['text'];

$message = 
$author." envio un email:\r\n Mensaje: ";
$email."\r\nTelefono: ";
$telf."\r\nCiudad: ";
$ciudad."\r\n\n\nMessage:\r\n<----BEGINNING OF MESSAGE!---->\r\n";
.$body."\r\n\n<----END OF MESSAGE!---->\r\n";

$eol = "\r\n";
$mime_boundary=md5(time());

  $headers .= 'From: '.$author.' .<'.$fromaddress.'>'.$eol;
  $headers .= 'Reply-To: '.$author.' .<'.$fromaddress.'>'.$eol;
  $headers .= 'Return-Path: '.$author.' .<'.$fromaddress.'>'.$eol;
  $headers .= "Message-ID: <".time()." TheSystem@".$_SERVER['SERVER_NAME'].">".$eol;
  $headers .= "X-Mailer: PHP v".phpversion().$eol;
  $headers .= 'MIME-Version: 1.0'.$eol;
  $headers .= "Content-Type: multipart/related; boundary=\"".$mime_boundary."\"".$eol;

$msg .= "Content-Type: multipart/alternative".$eol;
$msg .= "--".$mime_boundary.$eol;
$msg .= "Content-Type: text/plain; charset=iso-8859-1".$eol;
$msg .= "Content-Transfer-Encoding: 8bit".$eol;
$msg .= strip_tags(str_replace("<br>", "\n", $message)).$eol.$eol;
$msg .= "--".$mime_boundary.$eol;
$msg .= "Content-Type: text/html; charset=iso-8859-1".$eol;
$msg .= "Content-Transfer-Encoding: 8bit".$eol;
$msg .= str_replace("\n", "<br>", $message).$eol.$eol;
$msg .= "--".$mime_boundary."--".$eol.$eol; 
ini_set(sendmail_from, $fromaddress);  // the INI lines are to force the From Address to be used !
$formsent = mail($mailto, $messagesubject, $msg, $headers);
ini_restore(sendmail_from);

if ($formsent) {
	echo "<fieldset style='background-color:#FFFFCC;'><legend>¡Gracias! ".$author."</legend><p>ya recibimos tu email, te contestaremos a la brevedad posible.</p></fieldset>";
	}else{
	echo "Hubo un problema con la planilla de contact, intenta de nuevo";
	}
?>


Código:
<form method="post" name="contact" id="contact_form"  class="leyenda" action="sendmail.php">
<div class="clear"><h2>Formulario de contacto</h2><br/></div>
<input type="hidden" name="post" value=" Send " />

<div class="float">
<label for="author">* Nombre:</label><br/>
<input type="text" id="author" name="author" class="required" />
</div>
<div class="float" style="clear:right">
<label for="email">* Correo electronico:</label><br/>
<input type="text" id="email" name="email" class="required email" />
</div>
<div class="float">
<label for="telf">Telefono de contacto:</label><br/>
<input type="text" name="telf" id="telf" class="digits" />
</div>
<div class="float">
<label for="ciudad">Ciudad / Localidad</label><br/>
<input type="text" name="ciudad" id="ciudad" /><br/><br/>
</div>
<div style="clear:both">
<label for="text">* Comentario:</label><br />
<textarea id="text" name="text" rows="6" cols="42" class="required"></textarea><br /><br />
<input type="submit" name="submitbutton" id="submitbutton" value=" Enviar " />
<div id="progress" style="display:none;">Enviando...</div>
</div>
</form>