Salve a tutti,
volevo chiedere gentilmente come risolvere questo problema.
Ho creato un form in flash con il relativo codice php che funziona regolarmente.

Ora da un pò di tempo utilizzo una richiesta di iscrizione alla newsletter che permette di ricevere 2 mail, una al mittente e una al destinatario con una serie di informazioni e allegando anche il logo dell'azienda. Questo file però non l'ho creato io.

Ora vorrei postare entrambi i codici PHP e chiedere se qualcuno sa dirmi come utilizzare
il secondo codice aggiungendo solamente le parti in più del primo codice quali: NOME, COGNOME, AZIENDA, TELEFONO, EMAIL, MESSAGGIO.

//FORM

<?php

// legge le variabili dalle stringhe del flash
$nome = $_REQUEST["nome"];
$cognome = $_REQUEST["cognome"];
$azienda = $_REQUEST["azienda"];
$telefono = $_REQUEST["telefono"];
$email = $_REQUEST["email"];
$messaggio = $_REQUEST["messaggio"];
$ip = $_SERVER['REMOTE_ADDR'];

//email in formato html
$mail_in_html = "MIME-Version: 1.0\r\n";
$mail_in_html .= "Content-type: text/html; charset=iso-8859-1\r\n";
$mail_in_html .= "From: $email";

// rimuove i backslhases
$nome = stripslashes($nome);
$cognome = stripslashes($cognome);
$azienda = stripslashes($azienda);
$telefono = stripslashes($telefono);
$email = stripslashes($email);
$messaggio = stripslashes($messaggio);

// crea il messaggio, incluso l'indirizzo IP del mittente
$message = "Contatto da $nome $cognome
";
$message .= "Nome: $nome
";
$message .= "Cognome: $cognome
";
$message .= "Azienda: $azienda
";
$message .= "Telefono: $telefono
";
$message .= "E-mail: $email
";
$message .= "Messaggio: $messaggio
";
$message .= "IP: $ip";

// oggetto dell'email
$subject = "Contatto da ". $nome . " " .$cognome;

// invio dell'email
if(isset($nome) and isset($cognome) and isset($azienda) and isset($telefono) and isset($email) and isset($messaggio)){
mail("info@eijiro-matsumi.com", $subject, $message, $mail_in_html);
}
?>

//NEWS LETTER

<?php
// php mailing list file
// place this file any where on your site and refrence it from the flash file, comments are supplied inside the flash file
// insert your email address here
$email="info@martinivittorio.com";
// variables from flash
$Semail=$_POST['mailingList'];
// email header format update the address below to format the send address of the email sent to you on signup of a new user
// these settings may vary depending on your server set up as the mail is being generated rather than sent
$headers = "From: mailinglist@martinivittorio.com\r\nContent-type: text/html";
// body, i.e content of the mail is formatted here, this is standard html and can easily be updated
$body ="<html><head></head><body>


Nuova Iscrizione
<hr>
Email: $Semail

<hr>
<div align='right'>Service Provided by eijiro-matsumi.com</div>
</body></html>";
mail($email, "Nuova Iscrizione", $body, $headers);
//Email sent back
$headers2 = "From: donotreply@martinivittorio.com\r\nContent-type: text/html";
$body2 ="<html><head></head><body>



Spett.le $Semail,


Grazie per aver dimostrato interesse al sito martinivittorio.com


Riceverai presto tutte le notizie riguardandi eventi e novità.


Dettagli registrazione:

<hr>
Email: $Semail

<hr>


<div align='right'>Service Provided by eijiro-matsumi.com

Questa è una risposta automatica generata dal server, non rispondere a questa e-mail. Grazie.
</div>
</body></html>";
mail($Semail, "Grazie per l'iscrizione! $Sname", $body2, $headers2);
?>