Ho un form per invio mail così strutturato:
codice:
<?

require("/home/www/php/classes/phpmailer/class.phpmailer.php");

$cognome=$_POST['cognome']; 
$nome=$_POST['nome']; 
$sender=$_POST['sender']; 
$telefono=$_POST['telefono']; 
$qualifica=$_POST['qualifica']; 
$matricola=$_POST['matricola']; 
$rel_resp=$_POST['rel_resp']; 
$autore=$_POST['autore']; 
$titolo=$_POST['titolo']; 
$editore=$_POST['editore']; 
$anno=$_POST['anno']; 
$isbn=$_POST['isbn']; 
# echo "Registrazione Inviata";

# $destinatario=$_POST['e_mail'];
$oggetto="Richiesta prestito interbibliotecario";
$mess="DATI UTENTE RICHIEDENTE\nCognome: " . $cognome . "\nNome: " . $nome . "\nEmail: " . $sender . "\nTelefono: " . $telefono . "\nQualifica: " . $qualifica . "\nMatricola: " . $matricola . "\nRelatore / Responsabile della ricerca: " . $rel_resp . "\nRICHIESTA MONOGRAFIA\nAutore: " . $autore . "\nTitolo: " . $titolo . "\nEditore: " . $editore . "\nLuogo: " . "\nAnno: " . $anno . "\nISBN: " . $isbn;
$sname="xxxxxxxxxxxxxx";
$email="xxxxxxxxxxxxxxx";


$mail = new PHPMailer();
$mail->IsSMTP();                                   // send via SMTP
$mail->Host     = "mail.unipa.it"; // SMTP servers
$mail->SMTPAuth = false;     // turn on SMTP authentication

$mail->From     = $sender;
$mail->FromName = $sname;
$mail->AddAddress($email);
$mail->AddReplyTo($sender,$sname);
$mail->WordWrap = 50;
$mail->IsHTML(false);
$mail->Subject  =  $oggetto;
$mail->Body     =  $mess;

if(!$mail->Send())
{
   echo "Il messaggio non è stato inviato 

";
   echo "Mailer Error: " . $mail->ErrorInfo;
   exit;
}

echo "Il messaggio è stato inviato";


?>
Vorrei che oltre a questi dati arrivasse anche l'ip di chi invia il form.
Come debbo fare?