è una funzione
Codice PHP:
function mail_dati($mmail,$user,$password,$location) {
$mail = 'MIA SOCIETA';
$mailsubject = 'AREA RISERVATA';
$fromname = 'MIA SOCIETA';
$fromaddress = 'MIA SOCIETA';
$destinatario = $mmail;
$headers = "From: ".$fromname." <".$mail.">\n";
$headers.= "Return-Path: <".$fromaddress.">\n";
$headers.= "Content-Type: text/plain; charset=iso-8859-1";
$message = '
<html>
<head>
<title>MIA SOCIETA</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#BDC4BC" topmargin="0" bottommargin="0" marginheight="0">
<div align="center">
<table width="225" border="0" class="testo">
<tr>
<td width="91" class="style2">USER:</td>
<td width="169" class="style2">'.$user.'</td>
</tr>
<tr>
<td class="style2">PASSWORD:</td>
<td class="style2">'.$password.'</td>
</tr>
</table>
</div>
</body>
</html>
';
if(!mail("$destinatario", "$mailsubject", "$message", "From: $mail\nContent-Type: text/html; charset=iso-8859-1")) {
$error = "ATTENZIONE, NON E' STATO POSSIBILE INVIARE LA MAIL";
}else{
header("Location: ".$location);
exit;
}
}
:master: