Ciao a tutti. Sono nuovo e mi presento: neofita di PHP e HTML.
Ho creato un form per richiedere un permesso al capo ufficio. Fin qui tutto bene: la mail arriva perfettamente in formato HTML. Nella mail ho inserito un button (AUTORIZZO) per inoltrare la stessa identica mail al capo servizio. Qui casca l'asino: il button non funziona. Si apre una pagina Web con l'errore: res://ieframe.dll/syntax.htm#valentini.php
Ringrazio anticipatamente
Posto il codice:
<?php
//get contact form details
$name = $_POST['nome'];
$cognome = $_POST['cognome'];
$email = $_POST['email'];
$permesso = $_POST['permesso'];
$dal = $_POST['dal'];
$al = $_POST['al'];
$comments = $_POST['commento'];
$ora1 = $_POST['ora1'];
$ora2 = $_POST['ora2'];
$auto = $_POST['auto'];
$note = $_POST['note'];

require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // diciamo alla classe di usare SMTP
$mail->Host = "smtp.xxxxx.it"; // SMTP server, questo valore è da modificare!
$mail->Mailer = "smtp";
$mail->SetLanguage("it", "phpmailer/language");
$mail->From = "xxxxxx@xxxxx.it"; // L'account email che state utilizzando
$mail->FromName = "xxxxxxxx";
$mail->AddAddress("xxxxxx@xxxxx.it"); // L'indirizzo email di destinazione
$mail->Password = "xxxxxxxx";
$mail->Username = "xxxxxxx@xxxxxx.it";
$mail->Subject = "Richiesta $name $cognome";
$mail->SMTPAuth = "true";

$htmlBody = '<html>
<head>
<title>My HTML Email</title>
</head>
<body>


<h2 align="center">Richiesta autorizzazione alla assenza dal servizio</h2>


<FORM METHOD=GET ACTION="valentini.php"> // Boh???????




<font face="TimesNewRoman" color="red">DIPENDENTE: </font><font face="TimesNewRoman" color="blue">[cognome] [nome]</font></style>
&emsp;
<font face="TimesNewRoman" color="red">PERMESSO: </font><font face="TimesNewRoman" color="blue">[permesso]</font></style>
&emsp;
<font face="TimesNewRoman" color="red">DAL: </font><font face="TimesNewRoman" color="blue">[dal]</font></style>
&emsp;
<font face="TimesNewRoman" color="red">AL: </font><font face="TimesNewRoman" color="blue">[al]</font></style>
&emsp;
<font face="TimesNewRoman" color="red">DALLE: </font><font face="TimesNewRoman" color="blue">[ora1]</font></style>
&emsp;
<font face="TimesNewRoman" color="red">ALLE: </font><font face="TimesNewRoman" color="blue">[ora2]</font></style></p>


<font face="TimesNewRoman" color="red">MOTIVO: </font><font face="TimesNewRoman" color="blue">[comments]</font></style>
&emsp;
<font face="TimesNewRoman" color="red">MEZZO: </font><font face="TimesNewRoman" color="blue">[auto]</font></style>
&emsp;
<font face="TimesNewRoman" color="red">NOTE: </font><font face="TimesNewRoman" color="blue">[note]</font></style></p>


<input type="submit" align="center" value="AUTORIZZO" /></p>
';



$htmlBody = str_replace('[cognome]',$cognome,$htmlBody);
$htmlBody = str_replace('[nome]',$name,$htmlBody);
$htmlBody = str_replace('[permesso]',$permesso,$htmlBody);
$htmlBody = str_replace('[dal]',$dal,$htmlBody);
$htmlBody = str_replace('[al]',$al,$htmlBody);
$htmlBody = str_replace('[ora1]',$ora1,$htmlBody);
$htmlBody = str_replace('[ora2]',$ora2,$htmlBody);
$htmlBody = str_replace('[comments]',$comments,$htmlBody);
$htmlBody = str_replace('[auto]',$auto,$htmlBody);
$htmlBody = str_replace('[note]',$note,$htmlBody);
$mail->Body=$htmlBody;
$mail->isHTML(true);
if(!$mail->Send()) {
echo $mail->ErrorInfo;
} else {
echo "Mail inviata con successo";
}
?>