salve ragazzi buonasera volevo domandarvi ho deciso di usare una classe class.phpmailer.php adesso secondo voi cosa potrebbe essere l errore ho provato ad usare un esempio che esce nella classe
Codice PHP:
if($inserisco_dati_di_registrazione){
$verific_mess_email_registrazion = mysql_query("select * from email_status where register_user = '1'");
$result_mess_email_registrazion = mysql_num_rows($verific_mess_email_registrazion);
if($result_mess_email_registrazion == 1){
$user_dati = " SELECT * FROM utenti
WHERE `email` ='$email'";
$result = mysql_query($user_dati);
// controllo l'esito
if (!$result) {
die("Errore nella query $user_dati: " . mysql_error());
}
while($row = mysql_fetch_array($result))
{
$nome = $row['nome'];
$cognome = $row['cognome'];
$telefono = $row['telefono'];
$email = $row['email'];
$dat_iscrizione = $row['date'];
$date_ultimemod_user = $row['date_ultima_mod'];
$numero_a_caso = $row['caso'];
}
include_once('../includes/class/class.phpmailer.php');
$mail = new PHPMailer();
$body = $mail->getFile('contents.html');
$body = eregi_replace("[\]",'',$body);
$mail->From = "$email";
$mail->FromName = "$nome";
$mail->Subject = "Registration Pending for $nome Support Desk";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->MsgHTML($body);
$mail->AddAddress("support@marikwebnet.com", "John Doe");
if(!$mail->Send()) {
echo 'Failed to send mail';
} else {
echo 'Mail sent';
}
}
un altra cosa i percorsi della lingua doe si devono settare?