salve a tutti,
ho installato sul mio server la versione stabile di PHPMailer, una classe che permette di interfacciarsi con i comandi php per mandare e-mail.
Posto il codice:

codice:
define('GUSER', $rImpo["user_name"]);
define('GPWD',  $rImpo["password"]);
    
define('SMTP_EST', $rImpo["server"]);
    
function smtpmailer($to, $from, $from_name, $subject, $body) {
        global $error;
        $mail = new PHPMailer();  // create a new object
        $mail->IsSMTP(); // enable SMTP
        $mail->SMTPDebug = 1;  // debugging: 1 = errors and messages, 2 = messages only
        $mail->SMTPAuth = true;  // authentication enabled
        //$mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail
        $mail->Host = 'smtp.email.it';
        $mail->Port = 25;
        $mail->Username = '<mio_account_email_senza_il_"@email.it" ';
        $mail->Password = 'mia_password';
        $mail->SetFrom($from, $from_name);
        $mail->Subject = $subject;
        $mail->Body = $body;
        $mail->AddAddress('<indirizzo_email_su_cui_ricevere>');
        
        if(!$mail->Send()) {
            $error = 'Mail error: '.$mail->ErrorInfo;
            return false;
        } else {
            $error = 'Message sent!';
            return true;
        }
}
quindi facendo:

codice:
if (smtpmailer('<indirizzo_email_su_cui_ricevere>', $from, $nome_sito, $oggetto, $mess))
     echo 'Tutto apposto a ferragosto!';
if (!empty($error))
        echo $error;
ma indovinate un po'? non funziona, mi dà il seguente messaggio:

codice:
SMTP -> ERROR: RCPT not accepted from server: 553 5.7.1 : Sender address rejected: not owned by user <indirizzo_email_su_cui_ricevere>
SMTP Error: The following recipients failed: <indirizzo_email_su_cui_ricevere> Mail error: SMTP Error: The following recipients failed: <indirizzo_email_su_cui_ricevere>

SMTP server error: 5.7.1 : Sender address rejected: not owned by user <indirizzo_email_su_cui_ricevere>
potete darmi una mano?